diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-10-31 15:49:49 +0100 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-11-03 08:47:12 -0800 |
| commit | 0514719b3cfadf0c80d10dc6652154c7c2a86bce (patch) | |
| tree | 80694e7b71d62590b53c71260132d22b4eb60a9a /unittests | |
| parent | d00f840c573103c2d51aed2b169386f7acfe7026 (diff) | |
| download | meson-0514719b3cfadf0c80d10dc6652154c7c2a86bce.tar.gz | |
backends: add CustomTargetIndexes to meson-{test,benchmark}-prereq
If a CustomTargetIndex is passed as an argument to a test, running meson
test (with no test glob) does not automatically build the custom_target
before running the test, because CustomTargetIndex outputs are not added
as prerequisites to the meson-test-prereq and meson-benchmark-prereq
targets.
Fixes: #14743
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'unittests')
| -rw-r--r-- | unittests/allplatformstests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index cf3427aeb..557fe2a52 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -4471,6 +4471,14 @@ class AllPlatformTests(BasePlatformTests): self.build() self.run_tests() + def test_custom_target_index_as_test_prereq(self): + if self.backend is not Backend.ninja: + raise SkipTest('ninja backend needed for "meson test" to build test dependencies') + + testdir = os.path.join(self.unit_test_dir, '131 custom target index test') + self.init(testdir) + self.run_tests() + @skipUnless(is_linux() and (re.search('^i.86$|^x86$|^x64$|^x86_64$|^amd64$', platform.processor()) is not None), 'Requires ASM compiler for x86 or x86_64 platform currently only available on Linux CI runners') def test_nostdlib(self): |
