Skip to content

Commit

Permalink
Fix util tests
Browse files Browse the repository at this point in the history
  • Loading branch information
climbfuji committed Mar 8, 2024
1 parent db9ae43 commit 2ae50c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/util-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ jobs:
- name: checkout
uses: actions/checkout@v2
with:
submodules: false
submodules: true

- name: run-util-tests
run: |
export SPACK_STACK_DIR=$PWD
source ./setup.sh
cd util/
./util_tests.sh
3 changes: 0 additions & 3 deletions util/check_package_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@

SPACK_ROOT = os.getenv("SPACK_ROOT")
assert SPACK_ROOT, "$SPACK_ROOT must be set but is not!"
print(SPACK_ROOT)
print(os.listdir(SPACK_ROOT))
print(os.listdir(os.path.join(SPACK_ROOT, "lib/spack/external/_vendoring")))

sys.path.append(os.path.join(SPACK_ROOT, "lib/spack/external/_vendoring"))
from ruamel import yaml
Expand Down
5 changes: 4 additions & 1 deletion util/util_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,10 @@ fi

## Check check_package_config.py
export SPACK_ENV=${SPACK_STACK_DIR}/util/test_env
export SPACK_ROOT=${SPACK_STACK_DIR}/spack
### NOT NEEDED I THINK export SPACK_ROOT=${SPACK_STACK_DIR}/spack
${SPACK_STACK_DIR}/util/check_package_config.py
${SPACK_STACK_DIR}/util/check_package_config.py | sort
${SPACK_STACK_DIR}/util/check_package_config.py | sort | md5sum
output_checksum=$(${SPACK_STACK_DIR}/util/check_package_config.py | sort | md5sum)
reference_checksum=$(cat ${SPACK_STACK_DIR}/util/test_env/package_check_baseline.txt | md5sum)
if [[ "$output_checksum" != "$reference_checksum" ]]; then
Expand Down

0 comments on commit 2ae50c5

Please sign in to comment.