Print a warning if the directory passed to --test-subdir doesn't end up existing

llvm-svn: 276709
This commit is contained in:
Enrico Granata 2016-07-25 23:26:24 +00:00
parent c5307c6993
commit d2a10e88f6
1 changed files with 2 additions and 0 deletions

View File

@ -1515,6 +1515,8 @@ def main(num_threads, test_subdir, test_runner_name, results_formatter):
test_directory = os.path.dirname(os.path.realpath(__file__))
if test_subdir and len(test_subdir) > 0:
test_subdir = os.path.join(test_directory, test_subdir)
if not os.path.isdir(test_subdir):
print('specified test subdirectory {} is not a valid directory\n'.format(test_subdir))
else:
test_subdir = test_directory