diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-10-07 13:13:54 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-05-18 13:53:58 -0700 |
commit | af787874a8e4eab8222382128ccfb5549b31c801 (patch) | |
tree | 6f67ec9f0a3f6b48681d7f981e83732266916456 /run_unittests.py | |
parent | 0ec94ca0629415d4b555e8ef38a5093a65e0539e (diff) | |
download | meson-af787874a8e4eab8222382128ccfb5549b31c801.zip meson-af787874a8e4eab8222382128ccfb5549b31c801.tar.gz meson-af787874a8e4eab8222382128ccfb5549b31c801.tar.bz2 |
pass exe_wrapper to test scripts through the environment
This adds a new MESON_EXE_WRAPPER environment variable containing the
string form of the exe_wrapper, if there is an exe_wrapper defined.
Fixes #4427
Diffstat (limited to 'run_unittests.py')
-rwxr-xr-x | run_unittests.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/run_unittests.py b/run_unittests.py index e326aa4..3e25f94 100755 --- a/run_unittests.py +++ b/run_unittests.py @@ -7584,7 +7584,7 @@ class CrossFileTests(BasePlatformTests): ''') def test_needs_exe_wrapper_true(self): - testdir = os.path.join(self.common_test_dir, '1 trivial') + testdir = os.path.join(self.unit_test_dir, '72 cross test passed') with tempfile.TemporaryDirectory() as d: p = Path(d) / 'crossfile' with p.open('wt') as f: @@ -7594,7 +7594,7 @@ class CrossFileTests(BasePlatformTests): self.assertRegex(out, r'Skipped:\s*1\s*\n') def test_needs_exe_wrapper_false(self): - testdir = os.path.join(self.common_test_dir, '1 trivial') + testdir = os.path.join(self.unit_test_dir, '72 cross test passed') with tempfile.TemporaryDirectory() as d: p = Path(d) / 'crossfile' with p.open('wt') as f: @@ -7604,7 +7604,7 @@ class CrossFileTests(BasePlatformTests): self.assertNotRegex(out, r'Skipped:\s*1\n') def test_needs_exe_wrapper_true_wrapper(self): - testdir = os.path.join(self.common_test_dir, '1 trivial') + testdir = os.path.join(self.unit_test_dir, '72 cross test passed') with tempfile.TemporaryDirectory() as d: s = Path(d) / 'wrapper.py' with s.open('wt') as f: @@ -7616,9 +7616,9 @@ class CrossFileTests(BasePlatformTests): needs_exe_wrapper=True, exe_wrapper=[str(s)])) - self.init(testdir, extra_args=['--cross-file=' + str(p)]) + self.init(testdir, extra_args=['--cross-file=' + str(p), '-Dexpect=true']) out = self.run_target('test') - self.assertNotRegex(out, r'Skipped:\s*1\s*\n') + self.assertRegex(out, r'Ok:\s*3\s*\n') def test_cross_exe_passed_no_wrapper(self): testdir = os.path.join(self.unit_test_dir, '72 cross test passed') @@ -7630,7 +7630,7 @@ class CrossFileTests(BasePlatformTests): self.init(testdir, extra_args=['--cross-file=' + str(p)]) self.build() out = self.run_target('test') - self.assertRegex(out, r'Skipped:\s*2\s*\n') + self.assertRegex(out, r'Skipped:\s*1\s*\n') # The test uses mocking and thus requires that the current process is the # one to run the Meson steps. If we are using an external test executable |