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: ...@@ -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 - spack-python site-config/ymerge.py spack.yaml site-config/$SYSTEMNAME/spack.yaml > /tmp/spack.yaml
- cp /tmp/spack.yaml $SPACK_ENV/ - cp /tmp/spack.yaml $SPACK_ENV/
- spack install -y -j2 --fresh --test root - spack install -y -j2 --fresh --test root
- spack test run wf-brainscales2-demos
after_script: after_script:
- mv /tmp/spack_tests $CI_PROJECT_DIR
- mkdir -p $CI_PROJECT_DIR/spack_logs/installed $CI_PROJECT_DIR/spack_logs/not_installed - 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 # 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 - 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: ...@@ -212,6 +214,7 @@ build-spack-env-on-runner:
artifacts: artifacts:
paths: paths:
- spack_logs - spack_logs
- spack_tests
when: always when: always
timeout: 2 days timeout: 2 days
except: except:
......
...@@ -37,16 +37,13 @@ class WfBrainscales2Demos(Package): ...@@ -37,16 +37,13 @@ class WfBrainscales2Demos(Package):
depends_on('py-pandas@1.4.2:', type=("run", "test")) depends_on('py-pandas@1.4.2:', type=("run", "test"))
def install(self, spec, prefix): def install(self, spec, prefix):
# sanity_check_prefix requires something in the install directory install_tree(".", join_path(prefix, "notebooks"))
mkdirp(prefix + "/.spack_test_results")
def _run_notebooks(self): def _run_notebooks(self, output_dir):
# TODO: remove debug output mkdirp(output_dir)
cmd_env = which("env")
cmd_env()
# execute notebook and save # execute notebook and save
jupyter = Executable("jupyter") 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", jupyter("nbconvert",
"--ExecutePreprocessor.kernel_name=python3", "--ExecutePreprocessor.kernel_name=python3",
"--execute", "--execute",
...@@ -55,7 +52,7 @@ class WfBrainscales2Demos(Package): ...@@ -55,7 +52,7 @@ class WfBrainscales2Demos(Package):
"notebook", "notebook",
fn, fn,
"--output", "--output",
prefix + "/.spack_test_results/" + fn) join_path(output_dir, os.path.basename(fn)))
def _set_collab_things(self): def _set_collab_things(self):
# enable "EBRAINS lab" mode # enable "EBRAINS lab" mode
...@@ -69,8 +66,8 @@ class WfBrainscales2Demos(Package): ...@@ -69,8 +66,8 @@ class WfBrainscales2Demos(Package):
def installcheck(self): def installcheck(self):
self._set_collab_things() self._set_collab_things()
# TODO (ECM): Provide a selection of notebooks that perform local-only tests. # 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._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