stand-alone (not built-time) tests
Merge request reports
Activity
First attempt for some scheduled tests, using Spack standalone tests:
spack test run -x
runs all methods namedtest_*
from all top-level packages in the environment.Unfortunately the test dependencies are not loaded correctly, so some tests fail, probably a Spack bag - I need to look into it.
For now those tests run:
- in a scheduled CI job that tests the entire environment (I think weekly is fine?)
- on every MR (only for any newly installed packages)
- on every merge to master (for the entire environment)
Once this works, we can use the same mechanism to test the Jupyterlab installation (with a scheduled OKD job from gitlab) and the HPC installations (by using unicore or jacamar or whatever else).
I used your notebook tests as an example and changed the logic a bit to make this work, so please have a look :) and if you have any other ideas let me know
Edited by Eleni Mathioulaki@emuller @terhorst test dependencies are still not loaded correctly when running
spack test run
, so tests for some packages fail when testing the entire env.But I think it makes sense to merge this just to have at least some stand-alone tests running e.g. weekly as an alternative to the installation-time tests - I started with your 2 wf packages.
Then later we can decide which tests need to run when and debug the dependency issue.
what do you think?
27 depends_on("r-aod") 28 depends_on("py-notebook", type="test") 20 depends_on("py-nested-dict", type=("run", "test")) 21 depends_on("py-dicthash", type=("run", "test")) 22 depends_on("py-matplotlib", type=("run", "test")) 23 depends_on("py-numpy", type=("run", "test")) 24 depends_on("py-scipy", type=("run", "test")) 25 depends_on("py-future", type=("run", "test")) 26 depends_on("nest", type=("run", "test")) 27 depends_on("r-aod", type=("run", "test")) 28 depends_on("py-notebook", type=("run", "test")) 29 29 30 30 def install(self, spec, prefix): 31 # sanity_check_prefix requires something in the install directory 32 mkdirp(prefix + "/.spack_test_results") 31 install_tree(".", join_path(prefix, "notebooks")) I suppose so (and am am very happy with that). The question would be if the sources are available during test time. For periodic tests either the notebooks are installed, or the repo needs to be re-cloned. I'm fine with having them installed. In our case the repos are really light-weight. In general, this might however require a conceptual discussion how
wf-
packages are set up. We might for example consider to require notebooks to be in a dedicated subfolder andinstall_tree("notebooks", join_path(prefix, "notebooks"))
or so. For now I think we can leave it up to the package maintainers to make a sensible choice of what to install.
For me this looks like a good starting point. With the
TEST_DEPLOYMENT
variable this is controllable from the outside, so even post-release it can be turned off if necessary. It may not be the perfect solution for all workflows, as they might pull in quite some data when run, or require access to services, but I'd be interested to see how far this carries. I'd vote to give it a try.mentioned in commit efc64bbc