Skip to content
Snippets Groups Projects
Commit ecb4f8c8 authored by Eleni Mathioulaki's avatar Eleni Mathioulaki
Browse files

try to run spack stand-alone tests

parent 20dec4b3
No related branches found
No related tags found
No related merge requests found
......@@ -202,7 +202,9 @@ build-spack-env-on-runner:
- spack-python site-config/ymerge.py spack.yaml site-config/$SYSTEMNAME/spack.yaml > /tmp/spack.yaml
- cp /tmp/spack.yaml $SPACK_ENV/
- spack install -y -j2 --fresh --test root
- spack test run wf-brainscales2-demos
after_script:
- mv /tmp/spack_tests $CI_PROJECT_DIR
- mkdir -p $CI_PROJECT_DIR/spack_logs/installed $CI_PROJECT_DIR/spack_logs/not_installed
# for succesfully installed packages: keep the spack logs for any package modified during this CI job
- PKG_DIR=$SPACK_DEV_PATH/opt/spack/linux-ubuntu20.04-x86_64/gcc-10.3.0
......@@ -212,6 +214,7 @@ build-spack-env-on-runner:
artifacts:
paths:
- spack_logs
- spack_tests
when: always
timeout: 2 days
except:
......
......@@ -37,16 +37,13 @@ class WfBrainscales2Demos(Package):
depends_on('py-pandas@1.4.2:', type=("run", "test"))
def install(self, spec, prefix):
# sanity_check_prefix requires something in the install directory
mkdirp(prefix + "/.spack_test_results")
install_tree(".", join_path(prefix, "notebooks"))
def _run_notebooks(self):
# TODO: remove debug output
cmd_env = which("env")
cmd_env()
def _run_notebooks(self, output_dir):
mkdirp(output_dir)
# execute notebook and save
jupyter = Executable("jupyter")
for fn in glob("ts*.ipynb") + glob("tp*.ipynb"):
for fn in glob(join_path(prefix, "notebooks", "ts*.ipynb")) + glob(join_path(prefix, "notebooks", "tp*.ipynb")):
jupyter("nbconvert",
"--ExecutePreprocessor.kernel_name=python3",
"--execute",
......@@ -55,7 +52,7 @@ class WfBrainscales2Demos(Package):
"notebook",
fn,
"--output",
prefix + "/.spack_test_results/" + fn)
join_path(output_dir, os.path.basename(fn)))
def _set_collab_things(self):
# enable "EBRAINS lab" mode
......@@ -69,8 +66,8 @@ class WfBrainscales2Demos(Package):
def installcheck(self):
self._set_collab_things()
# TODO (ECM): Provide a selection of notebooks that perform local-only tests.
#self._run_notebooks()
#self._run_notebooks(join_path(self.prefix, ".spack_test_results"))
def test_notebooks(self):
def test(self):
self._set_collab_things()
self._run_notebooks()
self._run_notebooks(join_path(self.test_suite.stage, self.spec.format("out-{name}-{version}-{hash:7}")))
config:
test_stage: /tmp/spack_tests
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment