Skip to content

Commit

Permalink
REVERT ME: move workflows to TMP directory
Browse files Browse the repository at this point in the history
  • Loading branch information
climbfuji committed Mar 8, 2024
1 parent a2cc7a0 commit fd7472e
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 6 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
8 changes: 4 additions & 4 deletions util/check_package_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
SPACK_ROOT = os.getenv("SPACK_ROOT")
assert SPACK_ROOT, "$SPACK_ROOT must be set but is not!"

SPACK_ENV = os.getenv("SPACK_ENV")
assert SPACK_ENV, "$SPACK_ENV must be set but is not!"

print("SPACK_ENV", SPACK_ENV)
print("SPACK_ROOT", SPACK_ROOT)
print("os.listdir(SPACK_ROOT)", os.listdir(SPACK_ROOT))
print("os.listdir(os.path.join(SPACK_ROOT, "lib/spack/external/_vendoring"))", os.listdir(os.path.join(SPACK_ROOT, "lib/spack/external/_vendoring")))
print('os.listdir(os.path.join(SPACK_ROOT, "lib/spack/external/_vendoring"))', 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

SPACK_ENV = os.getenv("SPACK_ENV")
assert SPACK_ENV, "$SPACK_ENV must be set but is not!"

# Load common/packages.yaml and site/packages.yaml for versions and externals, respectively
packages_versions_path = os.path.join(SPACK_ENV, "common", "packages.yaml")
with open(packages_versions_path, "r") as f:
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 fd7472e

Please sign in to comment.