Disable tests that require several cores when running on a single core

This commit is contained in:
serge-sans-paille 2020-02-18 13:29:15 +00:00
parent 40c2f0e766
commit 8553d0d009
2 changed files with 40 additions and 0 deletions

39
99b03c1c18.patch Normal file
View File

@ -0,0 +1,39 @@
diff --git a/runtime/test/lit.cfg b/runtime/test/lit.cfg
index 8ff668a..8e15a38 100644
--- a/runtime/test/lit.cfg
+++ b/runtime/test/lit.cfg
@@ -100,6 +100,13 @@ if config.operating_system == 'NetBSD':
if config.operating_system in ['Linux', 'Windows']:
config.available_features.add('affinity')
+import multiprocessing
+try:
+ if multiprocessing.cpu_count() > 1:
+ config.available_features.add('multicpu')
+except NotImplementedError:
+ pass
+
# to run with icc INTEL_LICENSE_FILE must be set
if 'INTEL_LICENSE_FILE' in os.environ:
config.environment['INTEL_LICENSE_FILE'] = os.environ['INTEL_LICENSE_FILE']
diff --git a/runtime/test/ompt/teams/parallel_team.c b/runtime/test/ompt/teams/parallel_team.c
index 15d9b6c..96ce0d5 100644
--- a/runtime/test/ompt/teams/parallel_team.c
+++ b/runtime/test/ompt/teams/parallel_team.c
@@ -1,5 +1,5 @@
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
-// REQUIRES: ompt
+// REQUIRES: ompt, multicpu
// UNSUPPORTED: gcc
#include "callback.h"
diff --git a/runtime/test/ompt/teams/serial_teams.c b/runtime/test/ompt/teams/serial_teams.c
index 64d0c89..abd3db5 100644
--- a/runtime/test/ompt/teams/serial_teams.c
+++ b/runtime/test/ompt/teams/serial_teams.c
@@ -1,5 +1,5 @@
// RUN: %libomp-compile-and-run | %sort-threads | FileCheck %s
-// REQUIRES: ompt
+// REQUIRES: ompt, multicpu
// UNSUPPORTED: gcc
#include "callback.h"

View File

@ -23,6 +23,7 @@ Source3: https://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver
Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc
Patch0: 0001-CMake-Make-LIBOMP_HEADERS_INSTALL_PATH-a-cache-varia.patch
Patch1: 99b03c1c18.patch
BuildRequires: cmake
BuildRequires: elfutils-libelf-devel