matrix broadcast: more robust test

This commit is contained in:
Gregory Becker 2023-02-23 15:47:11 -08:00
parent 7014eb3236
commit 1df6a3196a

View File

@ -216,10 +216,13 @@ def test_spec_list_constraints_with_structure(
assert libdwarf_spec in speclist.specs[0]
def test_spec_list_broadcast(self, mock_packages):
matrix = {"matrix": [["mpileaks"], ["^callpath"]], "broadcast": [["%gcc", "%clang"]]}
matrix = {
"matrix": [["mpileaks"], ["^callpath"]],
"broadcast": [["%gcc", "%clang"], ["+debug", "~debug"]]}
speclist = SpecList("specs", [matrix])
assert len(speclist) == 2
assert len(speclist) == 4
for spec in speclist:
for node in spec.traverse():
assert node.compiler.name == spec.compiler.name
assert node.variants["debug"].value == spec.variants["debug"].value