aboutsummaryrefslogtreecommitdiff
path: root/run_cross_test.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-05-09 16:17:20 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-05-09 16:17:20 +0300
commit572587f5cef0741cf68d5842d503ddb764e3d47b (patch)
tree61af19dce06ff84cf605b175885271706379219c /run_cross_test.py
parent717abc99fb57f1005717304e36583acd62b01fb4 (diff)
downloadmeson-572587f5cef0741cf68d5842d503ddb764e3d47b.zip
meson-572587f5cef0741cf68d5842d503ddb764e3d47b.tar.gz
meson-572587f5cef0741cf68d5842d503ddb764e3d47b.tar.bz2
Fix cross compilation tests.
Diffstat (limited to 'run_cross_test.py')
-rwxr-xr-xrun_cross_test.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/run_cross_test.py b/run_cross_test.py
index 6026336..7355c28 100755
--- a/run_cross_test.py
+++ b/run_cross_test.py
@@ -45,7 +45,7 @@ def run_test(testdir, should_succeed=True):
os.mkdir(test_build_dir)
os.mkdir(install_dir)
print('Running test: ' + testdir)
- gen_command = [sys.executable, meson_command, '--prefix', install_dir, '--libdir', 'lib', testdir, test_build_dir] + extra_flags
+ gen_command = [sys.executable, meson_command, '--prefix', '/usr', '--libdir', 'lib', testdir, test_build_dir] + extra_flags
p = subprocess.Popen(gen_command)
p.wait()
if not should_succeed:
@@ -62,7 +62,9 @@ def run_test(testdir, should_succeed=True):
pt.wait()
if pt.returncode != 0:
raise RuntimeError('Running unit tests failed.')
- pi = subprocess.Popen(install_commands, cwd=test_build_dir)
+ install_env = os.environ.copy()
+ install_env['DESTDIR'] = install_dir
+ pi = subprocess.Popen(install_commands, cwd=test_build_dir, env=install_env)
pi.wait()
if pi.returncode != 0:
raise RuntimeError('Running install failed.')