summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Volkl <valentin.volkl@cern.ch>2021-08-09 14:04:33 +0200
committerGitHub <noreply@github.com>2021-08-09 14:04:33 +0200
commitd4df3b31fb5580233afbb4bf652d3dde86315ba9 (patch)
treecb7d67ba19151678db112b6d25902a603665794b
parent597358e7359bc3eb0b3cd7f1131172546dfc814c (diff)
downloadspack-d4df3b31fb5580233afbb4bf652d3dde86315ba9.tar.gz
spack-d4df3b31fb5580233afbb4bf652d3dde86315ba9.tar.bz2
spack-d4df3b31fb5580233afbb4bf652d3dde86315ba9.tar.xz
spack-d4df3b31fb5580233afbb4bf652d3dde86315ba9.zip
dd4hep: fixes to run tests (#25204)
-rw-r--r--var/spack/repos/builtin/packages/dd4hep/package.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/dd4hep/package.py b/var/spack/repos/builtin/packages/dd4hep/package.py
index 2748bba803..51a615aba8 100644
--- a/var/spack/repos/builtin/packages/dd4hep/package.py
+++ b/var/spack/repos/builtin/packages/dd4hep/package.py
@@ -71,6 +71,7 @@ class Dd4hep(CMakePackage):
depends_on('hepmc3', when="+hepmc3")
depends_on('lcio', when="+lcio")
depends_on('edm4hep', when="+edm4hep")
+ depends_on('py-pytest', type="test")
# See https://github.com/AIDASoft/DD4hep/pull/771
conflicts('^cmake@3.16:3.17.0', when='@1.15',
@@ -130,3 +131,15 @@ class Dd4hep(CMakePackage):
version_str = 'v%02d-%02d-%02d.tar.gz' % (major, minor, patch)
return base_url + '/' + version_str
+
+ # dd4hep tests need to run after install step:
+ # disable the usual check
+ def check(self):
+ pass
+
+ # instead add custom check step that runs after installation
+ @run_after('install')
+ def install_check(self):
+ with working_dir(self.build_directory):
+ if self.run_tests:
+ ninja('test')