From b6886b2c27f6b9b18acc1c6ac57d6d64039aa815 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 12 Jan 2013 02:25:06 +0200 Subject: Added target install option. --- run_tests.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'run_tests.py') diff --git a/run_tests.py b/run_tests.py index 45d61d4..d2ac417 100755 --- a/run_tests.py +++ b/run_tests.py @@ -18,15 +18,19 @@ from glob import glob import os, subprocess, shutil test_build_dir = 'work area' +install_dir = os.path.join(os.path.split(os.path.abspath(__file__))[0], 'install dir') builder_command = './builder.py' compile_command = os.path.join(test_build_dir, 'compile.sh') test_command = os.path.join(test_build_dir, 'run_tests.sh') +install_command = os.path.join(test_build_dir, 'install.sh') def run_test(testdir): shutil.rmtree(test_build_dir) + shutil.rmtree(install_dir) os.mkdir(test_build_dir) + os.mkdir(install_dir) print('Running test: ' + testdir) - p = subprocess.Popen([builder_command, testdir, test_build_dir]) + p = subprocess.Popen([builder_command, '--prefix', install_dir, testdir, test_build_dir]) p.wait() if p.returncode != 0: raise RuntimeError('Generating the build system failed.') @@ -38,6 +42,10 @@ def run_test(testdir): pt.wait() if pt.returncode != 0: raise RuntimeError('Running unit tests failed.') + pi = subprocess.Popen([install_command]) + pi.wait() + if pi.returncode != 0: + raise RuntimeError('Running install failed.') def run_tests(): tests = glob('test cases/*') -- cgit v1.1