From 8fe02b8d504370fc433f7de2eace42f58d18b88b Mon Sep 17 00:00:00 2001 From: Todd Gamblin Date: Wed, 3 Jan 2024 23:17:54 -0800 Subject: [PATCH] bugfix: make `test_requires_directive` work on more platforms (#41943) Literal compiler config in `test_requires_directive` specifically lists `target: x86_64`, but it doesn't need to, and the unnecessary target makes the test fail on non-`x86_64` machines. - [x] Remove target from config yaml in `test_requires_directive` --- lib/spack/spack/test/concretize_requirements.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/test/concretize_requirements.py b/lib/spack/spack/test/concretize_requirements.py index 14b7ad1dfd..36fda88755 100644 --- a/lib/spack/spack/test/concretize_requirements.py +++ b/lib/spack/spack/test/concretize_requirements.py @@ -872,6 +872,8 @@ def test_skip_requirement_when_default_requirement_condition_cannot_be_met( def test_requires_directive(concretize_scope, mock_packages): compilers_yaml = pathlib.Path(concretize_scope) / "compilers.yaml" + + # NOTE: target is omitted here so that the test works on aarch64, as well. compilers_yaml.write_text( """ compilers:: @@ -883,7 +885,6 @@ def test_requires_directive(concretize_scope, mock_packages): f77: null fc: null operating_system: debian6 - target: x86_64 modules: [] """ )