Making call from run_tests to run_test subprocess.check_call

This commit is contained in:
Yannick Jadoul
2017-09-06 16:14:39 +02:00
parent 3188c978c9
commit 93d2a593c4
2 changed files with 3 additions and 7 deletions
+1 -4
View File
@@ -35,10 +35,7 @@ if __name__ == '__main__':
args = parser.parse_args()
project_path = os.path.abspath(args.test_project_dir)
# move cwd to the project root
os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
if not os.path.exists(project_path):
print('No test project not found.', file=sys.stderr)
exit(2)
+2 -3
View File
@@ -4,8 +4,6 @@ from __future__ import print_function
import os, sys, subprocess, shutil, json
from glob import glob
import run_test
if __name__ == '__main__':
# move cwd to the project root
os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
@@ -24,7 +22,8 @@ if __name__ == '__main__':
print('Testing projects:', test_projects)
run_test_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'run_test.py')
for project_path in test_projects:
run_test.single_run(project_path)
subprocess.check_call([sys.executable, run_test_path, project_path])
print('%d projects built successfully.' % len(test_projects))