From 0e41a340c039b1b70b9cf0c616b420ce6f79474b Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 7 Mar 2024 15:28:50 -0700 Subject: [PATCH 1/8] Fix several bugs in util/check_package_config.py b/util/check_package_config.py: import yaml from spack _vendored, catch non-existent variants --- util/check_package_config.py | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/util/check_package_config.py b/util/check_package_config.py index 16a6eb2bc..2ebc54600 100755 --- a/util/check_package_config.py +++ b/util/check_package_config.py @@ -19,7 +19,10 @@ import os import sys -import yaml +SPACK_ROOT = os.getenv("SPACK_ROOT") +assert SPACK_ROOT, "$SPACK_ROOT must be set but is not!" +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!" @@ -74,16 +77,21 @@ # Boolean variant if config_variant[0] in ("+", "~"): config_value = config_variant[0] == "+" - if concrete_spec["parameters"][config_variant[1:]] != config_value: + if not 'config_variant[1:]' in concrete_spec["parameters"].keys(): + variant_mismatch = True + elif concrete_spec["parameters"][config_variant[1:]] != config_value: variant_mismatch = True # Named variant elif "=" in config_variant: config_variant, config_value = config_variant.split("=") - concrete_values = concrete_spec["parameters"][config_variant] - if type(concrete_values) is str: - concrete_values = [concrete_values] - if set(config_value.split(",")) != set(concrete_values): + if not config_variant in concrete_spec["parameters"].keys(): variant_mismatch = True + else: + concrete_values = concrete_spec["parameters"][config_variant] + if type(concrete_values) is str: + concrete_values = [concrete_values] + if set(config_value.split(",")) != set(concrete_values): + variant_mismatch = True if variant_mismatch: iret = 1 print( From 0e6fc0ce7da884e5e9f2a656a9c6544db76dcc8b Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 7 Mar 2024 15:32:30 -0700 Subject: [PATCH 2/8] Remove upp from spack-ext/repos/spack-stack/packages/ufs-srw-app-env/package.py --- spack-ext/repos/spack-stack/packages/ufs-srw-app-env/package.py | 1 - 1 file changed, 1 deletion(-) diff --git a/spack-ext/repos/spack-stack/packages/ufs-srw-app-env/package.py b/spack-ext/repos/spack-stack/packages/ufs-srw-app-env/package.py index ebeef49a3..ae5501f1d 100644 --- a/spack-ext/repos/spack-stack/packages/ufs-srw-app-env/package.py +++ b/spack-ext/repos/spack-stack/packages/ufs-srw-app-env/package.py @@ -33,7 +33,6 @@ class UfsSrwAppEnv(BundlePackage): depends_on("ip") depends_on("sp") depends_on("w3nco") - depends_on("upp") depends_on("gfsio") depends_on("landsfcutil") depends_on("nemsio") From 5ceaf1d285d392afdfd7fb48aed69b81286ec149 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 7 Mar 2024 15:32:42 -0700 Subject: [PATCH 3/8] Clean up configs/templates/unified-dev/spack.yaml --- configs/templates/unified-dev/spack.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/configs/templates/unified-dev/spack.yaml b/configs/templates/unified-dev/spack.yaml index c6ada84bf..b6491ea83 100644 --- a/configs/templates/unified-dev/spack.yaml +++ b/configs/templates/unified-dev/spack.yaml @@ -20,13 +20,9 @@ spack: - jedi-tools-env - jedi-ufs-env - jedi-um-env - #- nceplibs-env - soca-env - ufs-srw-app-env - #- ufs-utils-env - ufs-weather-model-env - #- upp-env - #- ww3-env # Various fms tags (list all to avoid duplicate packages) - fms@release-jcsda From 1c06828826e2af1f6aafee87d8a20e594539d0d3 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 7 Mar 2024 17:02:39 -0700 Subject: [PATCH 4/8] Update README.md, project_charter.md and documentation with new maintainers and install responsibilities --- README.md | 2 +- doc/source/Overview.rst | 4 ++-- doc/source/PreConfiguredSites.rst | 40 +++++++++++++++---------------- project_charter.md | 6 ++--- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/README.md b/README.md index c7c59e77d..d8bfbd89a 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Full documentation with table of contents can be found at https://spack-stack.re Spack-stack is a collaborative effort between: * [NOAA Environmental Modeling Center (EMC)](https://www.emc.ncep.noaa.gov/emc_new.php): [Alex Richert](https://www.github.com/AlexanderRichert-NOAA), [Hang Lei](https://www.github.com/Hang-Lei-NOAA), [Ed Hartnett](https://www.github.com/edwardhartnett) * [UCAR Joint Center for Satellite Data Assimilation (JCSDA)](https://www.jcsda.org/): [Dom Heinzeller](https://www.github.com/climbfuji), [Steve Herbener](https://github.com/srherbener) -* [Earth Prediction Innovation Center (EPIC)](https://epic.noaa.gov/): [Cam Book](https://github.com/ulmononian), [Natalie Perlin](https://github.com/natalie-perlin) +* [Earth Prediction Innovation Center (EPIC)](https://epic.noaa.gov/): [Cam Book](https://github.com/ulmononian), [Natalie Perlin](https://github.com/natalie-perlin), [Ratko Vasic](https://github.com/ratkovasic-noaa) For more information about the organization of the spack-stack project, see the [Project Charter](project_charter.md). diff --git a/doc/source/Overview.rst b/doc/source/Overview.rst index 0d3303d06..0ef47d45d 100644 --- a/doc/source/Overview.rst +++ b/doc/source/Overview.rst @@ -15,11 +15,11 @@ spack-stack is mainly a collection of Spack configuration files, but provides a spack-stack is maintained by: -- Alex Richert (@AlexanderRichert-NOAA) and Ed Hartnett (@edwardhartnett), NOAA-EMC +- Alex Richert (@AlexanderRichert-NOAA), Hang Lei (@Hang-Lei-NOAA) and Ed Hartnett (@edwardhartnett), NOAA-EMC - Dom Heinzeller (@climbfuji) and Steve Herbener (@srherbener), JCSDA -- Cameron Book (@ulmononian) and Mark Potts (@mark-a-potts), EPIC +- Cameron Book (@ulmononian), Natalie Perlin (@natalie-perlin) and Ratko Vasic (@ratkovasic-noaa), EPIC =============== Getting started diff --git a/doc/source/PreConfiguredSites.rst b/doc/source/PreConfiguredSites.rst index 0a0486d40..26bdd6e76 100644 --- a/doc/source/PreConfiguredSites.rst +++ b/doc/source/PreConfiguredSites.rst @@ -16,49 +16,49 @@ Ready-to-use spack-stack 1.6.0 installations are available on the following, ful On selected systems, developmental versions / release candidates are installed that are newer than spack-stack 1.6.0 (see following table). For information on the spack-stack 1.6.0 releases on this platforms, please revert to version 1.6.0 of the documentation (https://spack-stack.readthedocs.io/en/1.6.0/PreConfiguredSites.html#pre-configured-sites-tier-1). +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| Organization | System | Compilers | Location | Maintainers | +| Organization | System | Compilers | Location | Maintainers (principal/backup)| +=====================+==================================+=================+=========================================================================================================+===============================+ | **HPC platforms** | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| MSU | Hercules GCC+OpenMPI recommended | GCC | ``/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/ue-gcc12-openmpi416`` | Dom Heinzeller | +| MSU | Hercules GCC+OpenMPI recommended | GCC | ``/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/ue-gcc12-openmpi416`` | EPIC / JCSDA | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | Hercules | (GCC), Intel | ``/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/unified-env`` | Cam Book / Dom Heinzeller | +| | Hercules | (GCC), Intel | ``/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.6.0/envs/unified-env`` | EPIC / JCSDA | | MSU +----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | Orion | GCC, Intel | ``/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.0/envs/unified-env`` | Cam Book / Dom Heinzeller | +| | Orion | GCC, Intel | ``/work/noaa/epic/role-epic/spack-stack/orion/spack-stack-1.6.0/envs/unified-env`` | EPIC / JCSDA | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | Discover SCU16 | GCC, Intel | ``/gpfsm/dswdev/jcsda/spack-stack/scu16/spack-stack-20240207/envs/unified-env-*`` | Dom Heinzeller / ??? | +| | Discover SCU16 | GCC, Intel | ``/gpfsm/dswdev/jcsda/spack-stack/scu16/spack-stack-20240207/envs/unified-env-*`` | JCSDA | | NASA +----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | Discover SCU17 | GCC, Intel | ``/gpfsm/dnb55/projects/p01/s2127/dheinzel/spstmil/envs/unified-env-*`` **TEMP FOR ACCEPTANCE TESTING** | Dom Heinzeller / ??? | +| | Discover SCU17 | GCC, Intel | ``/gpfsm/dnb55/projects/p01/s2127/dheinzel/spstmil/envs/unified-env-*`` **TEMP FOR ACCEPTANCE TESTING** | JCSDA | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | Casper | GCC | ``/glade/work/epicufsrt/contrib/spack-stack/casper/spack-stack-1.6.0/envs/unified-env`` | Dom Heinzeller / ??? | +| | Casper | GCC | ``/glade/work/epicufsrt/contrib/spack-stack/casper/spack-stack-1.6.0/envs/unified-env`` | JCSDA / EPIC | | NCAR-Wyoming +----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | Derecho | GCC, Intel | ``/glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.6.0/envs/unified-env`` | Dom Heinzeller / Cam Book | +| | Derecho | GCC, Intel | ``/glade/work/epicufsrt/contrib/spack-stack/derecho/spack-stack-1.6.0/envs/unified-env`` | EPIC / JCSDA | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| NOAA (NCEP) | Acorn | Intel | ``/lfs/h1/emc/nceplibs/noscrub/spack-stack/spack-stack-1.6.0/envs/unified-env-intel{19,2022}`` | Hang Lei / Alex Richert | +| NOAA (NCEP) | Acorn | Intel | ``/lfs/h1/emc/nceplibs/noscrub/spack-stack/spack-stack-1.6.0/envs/unified-env-intel{19,2022}`` | NOAA-EMC | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | Gaea C5 | Intel | ``/ncrc/proj/epic/spack-stack/spack-stack-1.6.0/envs/unified-env`` | Cam Book / Dom Heinzeller | +| | Gaea C5 | Intel | ``/ncrc/proj/epic/spack-stack/spack-stack-1.6.0/envs/unified-env`` | EPIC / NOAA-EMC | | +----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| NOAA (RDHPCS) | Hera | GCC, Intel | ``/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env`` | Mark Potts / Dom Heinzeller | +| NOAA (RDHPCS) | Hera | GCC, Intel | ``/scratch1/NCEPDEV/nems/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env`` | EPIC / NOAA-EMC | | +----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | Jet | GCC, Intel | ``/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env`` | Cam Book / Dom Heinzeller | +| | Jet | GCC, Intel | ``/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env`` | EPIC / NOAA-EMC | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | Narwhal | GCC, Intel | ``/p/app/projects/NEPTUNE/spack-stack/spack-stack-1.6.0/envs/unified-env-*`` | Dom Heinzeller / Sarah King | +| | Narwhal | GCC, Intel | ``/p/app/projects/NEPTUNE/spack-stack/spack-stack-1.6.0/envs/unified-env-*`` | JCSDA / NRL | | +----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| U.S. Navy (HPCMP) | Nautilus | Intel | ``/p/app/projects/NEPTUNE/spack-stack/spack-stack-1.6.0/envs/unified-env`` | Dom Heinzeller / Sarah King | +| U.S. Navy (HPCMP) | Nautilus | Intel | ``/p/app/projects/NEPTUNE/spack-stack/spack-stack-1.6.0/envs/unified-env`` | JCSDA / NRL | | +----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | Nautilus | AOCC | *currently not supported* | Dom Heinzeller / Sarah King | +| | Nautilus | AOCC | *currently not supported* | JCSDA / NRL | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | S4 | Intel | ``/data/prod/jedi/spack-stack/spack-stack-1.6.0/envs/unified-env`` | Dom Heinzeller / Mark Potts | +| | S4 | Intel | ``/data/prod/jedi/spack-stack/spack-stack-1.6.0/envs/unified-env`` | JCSDA | | Univ. of Wisconsin +----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | S4 | GCC | *currently not supported* | Dom Heinzeller / Mark Potts | +| | S4 | GCC | *currently not supported* | JCSDA | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ | **Cloud platforms** | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | AMI Red Hat 8 | GCC | ``/home/ec2-user/spack-stack/spack-stack-1.6.0/envs/unified-env`` | Dom Heinzeller / ??? | +| | AMI Red Hat 8 | GCC | ``/home/ec2-user/spack-stack/spack-stack-1.6.0/envs/unified-env`` | JCSDA | + Amazon Web Services +----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| | Parallelcluster JCSDA R&D | Intel | ``/mnt/experiments-efs/skylab-v8/spack-stack-20240207/envs/unified-env-*`` | Dom Heinzeller / ??? | +| | Parallelcluster JCSDA R&D | Intel | ``/mnt/experiments-efs/skylab-v8/spack-stack-20240207/envs/unified-env-*`` | JCSDA | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ -| NOAA (RDHPCS) | RDHPCS Cloud (Parallel Works) | Intel | ``/contrib/spack-stack/spack-stack-1.6.0/envs/unified-env`` | Mark Potts / Cam Book / Dom H | +| NOAA (RDHPCS) | RDHPCS Cloud (Parallel Works) | Intel | ``/contrib/spack-stack/spack-stack-1.6.0/envs/unified-env`` | EPIC / JCSDA | +---------------------+----------------------------------+-----------------+---------------------------------------------------------------------------------------------------------+-------------------------------+ For more information about a specific platform, please see the individual sections below. diff --git a/project_charter.md b/project_charter.md index 60c77ff2e..ca9bbc235 100644 --- a/project_charter.md +++ b/project_charter.md @@ -34,7 +34,7 @@ Organization | Code Manager(s) -------------|---------------- NOAA EMC | Alex Richert, Hang Lei, Ed Hartnett JCSDA | Dom Heinzeller, Steve Herbener -EPIC | Cam Book, Natalie Perlin +EPIC | Cam Book, Natalie Perlin, Ratko Vasic ## Project Process @@ -116,10 +116,10 @@ which case the work will be shared by the code managers. #### Directory structure of spack-stack installs -/path/to/spack-stack/spack-stack-x.y.z/envs/unified-env/install/compiler-name/compiler-version/package-name-version-hash +/path/to/spack-stack/spack-stack-x.y.z/envs/unified-env-compiler-name-compiler-version/install/compiler-name/compiler-version/package-name-version-hash _Example_ -/Users/heinzell/prod/spack-stack-1.4.0/envs/unified-env/install/apple-clang/13.1.6/netcdf-c-4.9.2-vrrvi2u +/Users/heinzell/prod/spack-stack-1.4.0/envs/unified-env-apple-clang-13.1.6/install/apple-clang/13.1.6/netcdf-c-4.9.2-vrrvi2u #### Auto-generated modules structure (no MPI dependency) From 815cd37a1b00e03097bb5a4a5e1ff091419a193c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 7 Mar 2024 20:54:53 -0700 Subject: [PATCH 5/8] Update util/ldd_check.py and documentation - this tool is available for Linux only --- doc/source/Utilities.rst | 4 ++-- util/ldd_check.py | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/doc/source/Utilities.rst b/doc/source/Utilities.rst index 22b2de344..b5eb0e1f7 100644 --- a/doc/source/Utilities.rst +++ b/doc/source/Utilities.rst @@ -46,10 +46,10 @@ The utility located at util/check_permissions.sh can be run inside any spack-sta .. _LDD_Checker: ------------------------------ -ldd_check.py +ldd_check.py (Linux only) ------------------------------ -The util/ldd_check.py utility should be run for new installations to ensure that no shared library or executable that uses shared libraries is missing a shared library dependency. If the script returns a warning for a given file, this may indicate that Spack's RPATH substitution has not been properly applied. In some instances, missing library dependencies may not indicate a problem, such as a library that is intended to be found through $LD_LIBRARY_PATH after, say, a compiler or MPI environment module is loaded. Though these paths should probably also be RPATH-ified, such instances of harmless missing dependencies may be ignored with ldd_check.py's ``--ignore`` option by specifying a Python regular expression to be excluded from consideration (see example below), or can be permanently whitelisted by modifying the ``whitelist`` variable at the top of the ldd_check.py script itself (in which case please submit a PR). The script searches the 'install/' subdirectory of a given path and runs ``ldd`` on all shared objects. The base path to be search can be specified as a lone positional argument, and by default is the current directory. In practice, this should be ``$SPACK_ENV`` for the environment in question. +The util/ldd_check.py utility should be run for new installations to ensure that no shared library or executable that uses shared libraries is missing a shared library dependency. If the script returns a warning for a given file, this may indicate that Spack's RPATH substitution has not been properly applied. In some instances, missing library dependencies may not indicate a problem, such as a library that is intended to be found through $LD_LIBRARY_PATH after, say, a compiler or MPI environment module is loaded. Though these paths should probably also be RPATH-ified, such instances of harmless missing dependencies may be ignored with ldd_check.py's ``--ignore`` option by specifying a Python regular expression to be excluded from consideration (see example below), or can be permanently whitelisted by modifying the ``whitelist`` variable at the top of the ldd_check.py script itself (in which case please submit a PR). The script searches the 'install/' subdirectory of a given path and runs ``ldd`` on all shared objects. The base path to be search can be specified as a lone positional argument, and by default is the current directory. In practice, this should be ``$SPACK_ENV`` for the environment in question. This utility is available for Linux only. .. code-block:: console diff --git a/util/ldd_check.py b/util/ldd_check.py index af6d3fa77..9cee8a838 100755 --- a/util/ldd_check.py +++ b/util/ldd_check.py @@ -49,17 +49,14 @@ ldd_cmd = "ldd" error_pattern = " => not found" getlibname = lambda line: re.findall("^[^ ]+", line)[0] -elif platform=="Darwin": - print("macOS not yet supported", file=sys.stderr) - sys.exit(1) + libext = "so" else: print(f"Platform '{platform}' not supported", file=sys.stderr) sys.exit(1) searchpath = os.path.join(args.path, "install") - bin_list = glob.glob(os.path.join(searchpath, "*/*/*/bin/*")) -dlib_list = glob.glob(os.path.join(searchpath, "*/*/*/lib*/*.{so,dylib}")) +dlib_list = glob.glob(os.path.join(searchpath, f"*/*/*/lib*/*.{libext}")) master_list = bin_list + dlib_list From abb3a4ea46f8ff0bec32ccaeef1d7da91ad94b3c Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Thu, 7 Mar 2024 21:06:17 -0700 Subject: [PATCH 6/8] Update util/util_tests.sh --- util/check_package_config.py | 4 ++++ util/util_tests.sh | 1 + 2 files changed, 5 insertions(+) diff --git a/util/check_package_config.py b/util/check_package_config.py index 2ebc54600..2f58f3f38 100755 --- a/util/check_package_config.py +++ b/util/check_package_config.py @@ -21,6 +21,10 @@ 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 diff --git a/util/util_tests.sh b/util/util_tests.sh index 609a1fcdf..e4f507052 100755 --- a/util/util_tests.sh +++ b/util/util_tests.sh @@ -80,6 +80,7 @@ fi ## Check check_package_config.py export SPACK_ENV=${SPACK_STACK_DIR}/util/test_env +export SPACK_ROOT=${SPACK_STACK_DIR}/spack 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 From 83b3cbd702dee853b2b64fb9259ffd10489f69a5 Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 8 Mar 2024 07:12:18 -0700 Subject: [PATCH 7/8] Update submodule pointer for spack --- spack | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spack b/spack index b1f29d9c8..3839d67d5 160000 --- a/spack +++ b/spack @@ -1 +1 @@ -Subproject commit b1f29d9c8105f36390e6e8f0178ab6e6005b30d6 +Subproject commit 3839d67d54fe6f67a8a60f983b2114b3894dc702 From 2ae50c5d34021ce260ddc63dcb8e8ea39efa41db Mon Sep 17 00:00:00 2001 From: Dom Heinzeller Date: Fri, 8 Mar 2024 07:12:33 -0700 Subject: [PATCH 8/8] Fix util tests --- .github/workflows/util-tests.yaml | 3 ++- util/check_package_config.py | 3 --- util/util_tests.sh | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/util-tests.yaml b/.github/workflows/util-tests.yaml index 41d494fc1..3bddf71eb 100644 --- a/.github/workflows/util-tests.yaml +++ b/.github/workflows/util-tests.yaml @@ -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 diff --git a/util/check_package_config.py b/util/check_package_config.py index 2f58f3f38..aa457e549 100755 --- a/util/check_package_config.py +++ b/util/check_package_config.py @@ -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 diff --git a/util/util_tests.sh b/util/util_tests.sh index e4f507052..1ba1fbd1a 100755 --- a/util/util_tests.sh +++ b/util/util_tests.sh @@ -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