Skip to content

Commit e6c83be

Browse files
authored
Merge pull request #32392 from GiudGiud/PR_ignore_cap
Fix --ignore options with capabilities
2 parents 5c7bc7b + a4386e9 commit e6c83be

2 files changed

Lines changed: 12 additions & 3 deletions

File tree

python/TestHarness/testers/RunApp.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -684,9 +684,12 @@ def prepare(self, options):
684684
if self.specs["capabilities"]:
685685
# Capabilities from this Tester's specs in addition
686686
# to capabilities from the global options
687-
capabilities = (
688-
self._augmented_capabilities | options._augmented_capabilities
689-
)
687+
if self._augmented_capabilities is not None:
688+
capabilities = (
689+
self._augmented_capabilities | options._augmented_capabilities
690+
)
691+
else:
692+
capabilities = options._augmented_capabilities
690693

691694
# Capture the capabilities that we need to dump, if any.
692695
# For now, we'll lazily just see if each of the

python/TestHarness/tests/test_Capabilities.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ def test(self):
249249
)
250250
self.assertIn(message, jobs[0].getTester().getOutput())
251251

252+
# Test not filtering due to --ignore: don't skip and don't even check
253+
_, jobs = self.runCapabilityTest(
254+
("compiler=unknown", False), cli_args=["--ignore"]
255+
)
256+
self.assertNotIn("Need compiler=unknown", jobs[0].getTester().getCaveats())
257+
252258
def testAugmented(self):
253259
"""Test filtering tests using augmented application capabilities."""
254260

0 commit comments

Comments
 (0)