summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Kaindl <43588962+bernhardkaindl@users.noreply.github.com>2021-10-14 18:02:31 +0200
committerGitHub <noreply@github.com>2021-10-14 09:02:31 -0700
commit95030a97b6097b44bb7b1e9d3138df8460423d12 (patch)
tree6baf6da0b89faaf5a8f776aa3430fbb772a840a3
parentb64a7fe1ff72b0ceaa744241674bb7bf2126e7d2 (diff)
downloadspack-95030a97b6097b44bb7b1e9d3138df8460423d12.tar.gz
spack-95030a97b6097b44bb7b1e9d3138df8460423d12.tar.bz2
spack-95030a97b6097b44bb7b1e9d3138df8460423d12.tar.xz
spack-95030a97b6097b44bb7b1e9d3138df8460423d12.zip
vc: Enable the testsuite, excluding tests failing on Zen2 (#26699)
This fixes running the testsuite, it adds the package virtest for it.
-rw-r--r--var/spack/repos/builtin/packages/vc/package.py9
-rw-r--r--var/spack/repos/builtin/packages/virtest/package.py26
2 files changed, 35 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/vc/package.py b/var/spack/repos/builtin/packages/vc/package.py
index 7de76ecb5a..209ac65361 100644
--- a/var/spack/repos/builtin/packages/vc/package.py
+++ b/var/spack/repos/builtin/packages/vc/package.py
@@ -23,6 +23,15 @@ class Vc(CMakePackage):
values=('Debug', 'Release', 'RelWithDebug',
'RelWithDebInfo', 'MinSizeRel'))
+ # Build fails without it when --test is used, can't be type='test':
+ depends_on('virtest')
+
+ def patch(self):
+ tests = FileFilter('tests/CMakeLists.txt')
+ tests.filter(';AVX2', '')
+ tests.filter('.*logarithm.*', '')
+ tests.filter('.*trigonometric.*', '')
+
def cmake_args(self):
if self.run_tests:
return ['-DBUILD_TESTING=ON']
diff --git a/var/spack/repos/builtin/packages/virtest/package.py b/var/spack/repos/builtin/packages/virtest/package.py
new file mode 100644
index 0000000000..c1fe879af8
--- /dev/null
+++ b/var/spack/repos/builtin/packages/virtest/package.py
@@ -0,0 +1,26 @@
+# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+import os
+
+from spack import *
+
+
+class Virtest(CMakePackage):
+ """Header-only unit test framework, as easy as possible to use"""
+
+ homepage = 'https://github.com/mattkretz/virtest'
+ git = 'https://github.com/mattkretz/virtest.git'
+ maintainers = ['bernhardkaindl']
+
+ version('master', branch='master')
+
+ def setup_run_environment(self, env):
+ env.prepend_path('CPATH', self.prefix.include.vir)
+
+ @run_after('install')
+ def rename_include_for_vc_package(self):
+ with working_dir(self.prefix.include):
+ os.rename('vir', 'virtest')