added a check for existance of sources

I ran into this earlier today and yesterday:
If you spelled something wrong/forgot to tab complete and had build succesfully before it woild silently and incorrectly build successfully
Jimmy Brisson 2016-05-18 17:28:33 -05:00
parent 3c08e7b7b3
commit f44b8fc9bf
1 changed files with 6 additions and 2 deletions

View File

@ -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())))