Tests production context runs of Spack
- Isolates behavior from individual package quirks
- Guarantees builds without worrying about Gitlab CI's pruning mechanisms (no "nothing to rebuild")
- Directly tests specific Spack behaviors via controlled, deliberatly composed packages and generated source code relying on those behaviors
- Production style useage of Spack allows a deliberate testing environment beyond the limited and contrived nature of unit tests
- In the event of failure revealed by the integration tests, allows for much faster development cycles without needing to wait hours for Gitlab to complete.
- Reduces AWS costs by catching some failures before kicking off expensive Gitlab CI pipelines
Compiler and Package detection
-
Adding a repo beyond builtin and utilizing packages from it
-
Fetching a package's source from a local file url
-
Successfully staging a packages source
-
Executing a build system and driving the build of that system
-
Installing the package from the build tree
-
Tests ability to run package defined tests
- Run them to verify a correct installation
Each of these higher level tasks exercises many more atomic sections of Spack that are well covered by our unit tests. The purpose served by these tests is to validate the integration and compatibility of each of these more atomic components
Current approach for adding a new integration test:
- Determine a subset of Spack functionality to target with an integration test (i.e. a fetcher - stage operation)
- Define a new package in
var/spack/test_repos/spack_repo/integration_test/x - Define the source code for
xinvar/spack/test_repos/spack_repo/integration_test/x/x-src(place makefile, configure script, etc. here) - A single version declaration like
version("0.1")(no hash) is recommended - Add a test method to package
xvalidating the package was properly installed/whatever other behavior needs confirmation - Add
xas a root spec tovar/spack/test_repos/spack_repo/integration_test/integration_env/spack.yaml
That's all you should need to do. Other notes about the process:
- The script
develop_env_specs.pyusesspack developonxwithx-src- This setup makes it easy to change source files inside
x-srcwithout updating any hashes - At the moment it would be awkward to maintain multiple versions of the source (although
develop_env_specscould be updated to use different source directories depending on the version of the package) - Generally speaking the focus on this repo is not on modeling variants/versions (concretization unit tests already do a good job of that)
- This setup makes it easy to change source files inside
- Note that packages in
integration_testrepo make use of packages in the builtin repo, e.g. using the builtin CMake build-system definition. For build systemsspack external addis used in the CI script (but if you add a package that depends on a new build system, you'll have to check the CI script for this).
Planned coverage:
CMake- Autotools
- Meson
- Make/NMake
- MsBuild
- Go
- Cargo
- Python
Target behavior on specific
- Platforms
- Architectures
- Operating Systems
- Https
- Ssh
- Git
- Bundle (no fetch)
- etc
Test setting up and pulling from a mirror
Different Configurations of Spack
- Concretizer settings
- Config settings
- Includes (Optional path, git, etc)
- Environment settings
- Mirror settings
- Package settings
- View settings
More complex repo setups
- Multi-package repository repos
- Mixed package API versions
- etc
Packages doing more complex things
- Packages with more complex configuration
- Packages with dependencies
- Virtual packages
- Bundle Packages
Test building, linking, running, and testing
- Shared Libraries
- Static Libraries
- Executables
- Python Modules
- C++ Modules
- Fortran Modules
- etc
Test all languages supported by Spack
- C/C++
- Fortran
- Python
- Rust
- Go
- R
- Ruby
- Java
- CUDA
- Lua
MPI introduces a lot of Spack logic. With a properly constructed integration test, we can have guarantees of basic MPI related behaviors functioning in Spack and behaving as expected without an expensive or potentiall no-op Gitlab CI run.
None forseen, Spack can install MPI. We may not be able to get a high rank test running, but that's not really the intent of this repo
Nvidia packages, ROCM, GPU development, and CUDA all introduce further complication into Spack's logic, this allows us to guarantee stability
CUDA is generally available on GHA runners, but GPUs are not. Additional considerations will need to be made to dertermine, how, if at all, we implement CUDA based integration testing as part of this repo.
HIP integration testing could be valuable
Feasibility to be investigated