From d4df3b31fb5580233afbb4bf652d3dde86315ba9 Mon Sep 17 00:00:00 2001 From: Valentin Volkl Date: Mon, 9 Aug 2021 14:04:33 +0200 Subject: dd4hep: fixes to run tests (#25204) --- var/spack/repos/builtin/packages/dd4hep/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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') -- cgit v1.2.3-60-g2f50