bugfix: spack load shell test can fail on macos (#34419)

At some point the `a` mock package became an `AutotoolsPackage`, and that means it
depends on `gnuconfig` on macOS. This was causing one of our shell tests to fail on
macOS because it was testing for `{a.prefix.bin}:{b.prefix.bin}` in `PATH`, but
`gnuconfig` shows up between them.

- [x] simplify the test to check `spack load --sh a` and `spack load --sh b` separately
This commit is contained in:
Todd Gamblin 2022-12-09 02:36:54 -08:00 committed by GitHub
parent 02a30f8d95
commit 606eef43bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,8 @@ contains "b@" echo $LIST_CONTENT
does_not_contain "a@" echo $LIST_CONTENT does_not_contain "a@" echo $LIST_CONTENT
fails spack -m load -l fails spack -m load -l
# test a variable MacOS clears and one it doesn't for recursive loads # test a variable MacOS clears and one it doesn't for recursive loads
contains "export PATH=$(spack -m location -i a)/bin:$(spack -m location -i b)/bin" spack -m load --sh a contains "export PATH=$(spack -m location -i a)/bin" spack -m load --sh a
contains "export PATH=$(spack -m location -i b)/bin" spack -m load --sh b
succeeds spack -m load --only dependencies a succeeds spack -m load --only dependencies a
succeeds spack -m load --only package a succeeds spack -m load --only package a
fails spack -m load d fails spack -m load d