Making call from run_tests to run_test subprocess.check_call
This commit is contained in:
+1
-4
@@ -35,10 +35,7 @@ if __name__ == '__main__':
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
project_path = os.path.abspath(args.test_project_dir)
|
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):
|
if not os.path.exists(project_path):
|
||||||
print('No test project not found.', file=sys.stderr)
|
print('No test project not found.', file=sys.stderr)
|
||||||
exit(2)
|
exit(2)
|
||||||
|
|||||||
+2
-3
@@ -4,8 +4,6 @@ from __future__ import print_function
|
|||||||
import os, sys, subprocess, shutil, json
|
import os, sys, subprocess, shutil, json
|
||||||
from glob import glob
|
from glob import glob
|
||||||
|
|
||||||
import run_test
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# move cwd to the project root
|
# move cwd to the project root
|
||||||
os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
||||||
@@ -24,7 +22,8 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
print('Testing projects:', test_projects)
|
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:
|
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))
|
print('%d projects built successfully.' % len(test_projects))
|
||||||
|
|||||||
Reference in New Issue
Block a user