diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2025-11-28 17:49:04 +0100 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-12-15 13:26:55 -0800 |
| commit | 5cd09bcabcf4845274cf19b9d796517bd4f8fc72 (patch) | |
| tree | 5623d1433dac79f687769c6352c9e3efc6ae80cd /unittests | |
| parent | 21e09772880abc8bd79ad9b8c61dd151a4a0c7ff (diff) | |
| download | meson-5cd09bcabcf4845274cf19b9d796517bd4f8fc72.tar.gz | |
cargo: add --check-cfg cfg(test) unconditionally
It should be added even if unexpected_cfgs is not part of Cargo.toml.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'unittests')
| -rw-r--r-- | unittests/cargotests.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/unittests/cargotests.py b/unittests/cargotests.py index 643ceceb4..e8eace74f 100644 --- a/unittests/cargotests.py +++ b/unittests/cargotests.py @@ -428,7 +428,7 @@ class CargoTomlTest(unittest.TestCase): self.assertEqual(manifest.lints[2].name, 'unexpected_cfgs') self.assertEqual(manifest.lints[2].level, 'deny') self.assertEqual(manifest.lints[2].priority, 0) - self.assertEqual(manifest.lints[2].check_cfg, ['cfg(test)', 'cfg(MESON)']) + self.assertEqual(manifest.lints[2].check_cfg, ['cfg(MESON)']) def test_cargo_toml_lints_to_args(self) -> None: with tempfile.TemporaryDirectory() as tmpdir: @@ -444,8 +444,7 @@ class CargoTomlTest(unittest.TestCase): self.assertEqual(manifest.lints[1].to_arguments(True), ['-A', 'unknown_lints']) self.assertEqual(manifest.lints[2].to_arguments(False), ['-D', 'unexpected_cfgs']) self.assertEqual(manifest.lints[2].to_arguments(True), - ['-D', 'unexpected_cfgs', '--check-cfg', 'cfg(test)', - '--check-cfg', 'cfg(MESON)']) + ['-D', 'unexpected_cfgs', '--check-cfg', 'cfg(MESON)']) def test_cargo_toml_dependencies(self) -> None: with tempfile.TemporaryDirectory() as tmpdir: |
