diff --git a/projects/rocdecode/samples/testScripts/README.md b/projects/rocdecode/samples/testScripts/README.md index 7c80ffc744..ec9515bc3f 100644 --- a/projects/rocdecode/samples/testScripts/README.md +++ b/projects/rocdecode/samples/testScripts/README.md @@ -22,7 +22,7 @@ usage: run_rocDecodeSamples.py [--rocDecode_directory ROCDECODE_DIRECTORY] optional arguments: -h, --help show this help message and exit --rocDecode_directory ROCDECODE_DIRECTORY - The rocDecode samples Directory - required + The rocDecode Directory - required --gpu_device_id GPU_DEVICE_ID The GPU device ID that will be used to run the test on it - optional (default:0 [range:0 - N-1] N = total number of available GPUs on a machine) --files_directory FILES_DIRECTORY diff --git a/projects/rocdecode/samples/testScripts/run_rocDecodeSamples.py b/projects/rocdecode/samples/testScripts/run_rocDecodeSamples.py index f974c6ab36..af38a69f5e 100644 --- a/projects/rocdecode/samples/testScripts/run_rocDecodeSamples.py +++ b/projects/rocdecode/samples/testScripts/run_rocDecodeSamples.py @@ -57,7 +57,7 @@ def iter_files(path): # Import arguments parser = argparse.ArgumentParser() parser.add_argument('--rocDecode_directory', type=str, default='', - help='The rocDecode samples Directory - required') + help='The rocDecode Directory - required') parser.add_argument('--gpu_device_id', type=int, default=0, help='The GPU device ID that will be used to run the test on it - optional (default:0 [range:0 - N-1] N = total number of available GPUs on a machine)') parser.add_argument('--files_directory', type=str, default='', @@ -94,6 +94,15 @@ else: print("\nERROR: rocDecode Executable Not Found\n") exit() +if os.path.exists(filesDir) and not os.path.isfile(filesDir): + # Checking if the directory is empty or not + if not os.listdir(filesDir): + print("\nERROR: Empty directory - no videos to decode") + exit() +else: + print("\nERROR: The input directory path is either for a file or directory does not exist!") + exit() + # Get cwd cwd = os.getcwd() if os.path.exists(resultsPath+'/rocDecode_output.log'):