aboutsummaryrefslogtreecommitdiff
path: root/run_tests.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2013-01-12 02:25:06 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2013-01-12 02:25:06 +0200
commitb6886b2c27f6b9b18acc1c6ac57d6d64039aa815 (patch)
treed26b78300caa757ba33378e7ed88ddbca477680a /run_tests.py
parent1bfae39a9d8f07ca5812a9130810bb329f104aff (diff)
downloadmeson-b6886b2c27f6b9b18acc1c6ac57d6d64039aa815.zip
meson-b6886b2c27f6b9b18acc1c6ac57d6d64039aa815.tar.gz
meson-b6886b2c27f6b9b18acc1c6ac57d6d64039aa815.tar.bz2
Added target install option.
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/*')