diff --git a/tools/make.py b/tools/make.py index 936bfbae11..81af64dc05 100755 --- a/tools/make.py +++ b/tools/make.py @@ -21,7 +21,7 @@ TEST BUILD & RUN import sys from time import sleep from shutil import copy -from os.path import join, abspath, dirname +from os.path import join, abspath, dirname, isfile, isdir # Be sure that the tools directory is in the search path ROOT = abspath(join(dirname(__file__), "..")) @@ -46,7 +46,6 @@ try: except: ps = object() - if __name__ == '__main__': # Parse Options parser = get_default_options_parser() @@ -167,6 +166,11 @@ if __name__ == '__main__': (options, args) = parser.parse_args() + for path in options.source_dir : + if not isfile(path) and not isdir(path) : + args_error(parser, "[ERROR] you passed \"{}\" to --source, which does not exist". + format(path)) + # Print available tests in order and exit if options.list_tests is True: print '\n'.join(map(str, sorted(TEST_MAP.values())))