aboutsummaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
Diffstat (limited to 'run_tests.py')
-rwxr-xr-xrun_tests.py10
1 files changed, 9 insertions, 1 deletions
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/*')