From a1efb27a8e9f3e649c25c3ab16524df1a3af3e67 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Wed, 2 Jan 2013 00:04:20 +0200 Subject: [PATCH] Run the generated build system as a part of tests. --- run_tests.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run_tests.py b/run_tests.py index 5fb931632..afaa7e630 100755 --- a/run_tests.py +++ b/run_tests.py @@ -19,6 +19,7 @@ import os, subprocess, shutil test_build_dir = 'work area' builder_command = './builder.py' +compile_command = os.path.join(test_build_dir, 'compile.sh') def run_test(testdir): shutil.rmtree(test_build_dir) @@ -27,7 +28,11 @@ def run_test(testdir): p = subprocess.Popen([builder_command, testdir, test_build_dir]) p.wait() if p.returncode != 0: - raise RuntimeError('Test failed.') + raise RuntimeError('Generating the build system failed.') + pc = subprocess.Popen([compile_command]) + pc.wait() + if pc.returncode != 0: + raise RuntimeError('Compiling source code failed.') def run_tests(): tests = glob('test cases/*')