From 89d01a98732232a50d98fc2444b84a17f79d4a21 Mon Sep 17 00:00:00 2001
From: Dennis Terhorst <d.terhorst@fz-juelich.de>
Date: Wed, 1 Feb 2023 11:40:09 +0100
Subject: [PATCH] fix condition on 'testsuite' variant

Co-Authored by: Eleni Mathioulaki <emathioulaki@athenarc.gr>
---
 packages/nest/package.py | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/packages/nest/package.py b/packages/nest/package.py
index 114fb391..64bf7045 100644
--- a/packages/nest/package.py
+++ b/packages/nest/package.py
@@ -194,19 +194,19 @@ class Nest(CMakePackage):
                                   self.stage.source_path, recursive=True):
                 install(f, path_headers)
 
-    @when('+testsuite')
     @run_after('install')
     @on_package_attributes(run_tests=True)
     def installcheck(self):
-        print('''
-        ##########################################
-        ###
-        ### RUNNING MAKE INSTALLCHECK
-        ###
-        ##########################################
-''')
-        with working_dir(self.build_directory):
-            make("installcheck")
+        if self.spec.variants['testsuite'].value:
+            print('''
+            ##########################################
+            ###
+            ### RUNNING MAKE INSTALLCHECK
+            ###
+            ##########################################
+    ''')
+            with working_dir(self.build_directory):
+                make("installcheck")
 
     def setup_run_environment(self, env):
         pass
-- 
GitLab