forked from spack/spack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: associate nodes directly with specs for compiler flag reorder…
…ing (spack#48496)
- Loading branch information
Showing
3 changed files
with
16 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
|
||
import pytest | ||
|
||
import spack.concretize | ||
import spack.config | ||
import spack.environment as ev | ||
import spack.paths | ||
|
@@ -96,6 +97,18 @@ def test_mix_spec_and_compiler_cfg(concretize_scope, test_repo): | |
assert s1.satisfies('cflags="-Wall -O2"') | ||
|
||
|
||
def test_pkg_flags_from_compiler_and_none(concretize_scope, mock_packages): | ||
conf_str = _compiler_cfg_one_entry_with_cflags("-Wall") | ||
update_concretize_scope(conf_str, "compilers") | ||
|
||
s1 = Spec("cmake%[email protected]") | ||
s2 = Spec("cmake-client^cmake%clang") | ||
concrete = dict(spack.concretize.concretize_together([(s1, None), (s2, None)])) | ||
|
||
assert concrete[s1].compiler_flags["cflags"] == ["-Wall"] | ||
assert concrete[s2].compiler_flags["cflags"] == [] | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"cmd_flags,req_flags,cmp_flags,dflags,expected_order", | ||
[ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters