-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create env: warn if upstream environment's config doesn't match (#1137)
* create env: warn if upstream environment's config doesn't match * add testing * ubuntu-ci-x86_64-gnu.yaml: debug env chaining warnings * debug ubuntu-ci-x86_64-gnu.yaml * more debug ubuntu-ci-x86_64-gnu.yaml * even more debug ubuntu-ci-x86_64-gnu.yaml * for upstream config check, use filecmp instead of system diff * debug * warn if upstream site or common dir does not exist at all --------- Co-authored-by: Dom Heinzeller <[email protected]>
- Loading branch information
1 parent
1774993
commit 2c9cb91
Showing
2 changed files
with
30 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,7 +177,7 @@ jobs: | |
# Test environment chaining | ||
echo "Test environment chaining" | ||
spack stack create env --name chaintest --template empty --site linux.default --upstream ${ENVDIR}/install --compiler gcc | ||
spack stack create env --name chaintest --template empty --site linux.default --compiler gcc --upstream ${ENVDIR}/install | ||
# Retain config from upstream so we don't have to rebuild: | ||
cp -r ${ENVDIR}/{site,common} $PWD/envs/chaintest/. | ||
spack env activate ${PWD}/envs/chaintest | ||
|
@@ -186,6 +186,12 @@ jobs: | |
unwanted_duplicates=$(( cat envs/chaintest/log.concretize | grep -E '^ - ' | grep -Fv '[email protected]' || true ) | wc -l) | ||
if [ ${unwanted_duplicates} -gt 0 ]; then echo "Environment chaining test failed"; exit 1; fi | ||
spack env deactivate | ||
echo "Verify 'create env' warnings" | ||
echo "# nothing" >> ${SPACK_STACK_DIR}/envs/chaintest/site/packages.yaml | ||
echo "# nothing" >> ${SPACK_STACK_DIR}/envs/chaintest/common/packages.yaml | ||
spack stack create env --name chaintest3 --site linux.default --compiler gcc --upstream ${SPACK_STACK_DIR}/envs/chaintest/install 2>&1 | tee stderr.txt | ||
cnt=$(grep -c "WARNING.*do not match" stderr.txt || true) | ||
if [ $cnt -ne 2 ]; then echo "Missing 'create env' warnings"; exit 1; fi | ||
- name: test-env | ||
run: | | ||
|
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