From 8553d0d0097bc04cadc35bc5466296559decf6a9 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Tue, 18 Feb 2020 13:29:15 +0000 Subject: [PATCH] Disable tests that require several cores when running on a single core --- 99b03c1c18.patch | 39 +++++++++++++++++++++++++++++++++++++++ libomp.spec | 1 + 2 files changed, 40 insertions(+) create mode 100644 99b03c1c18.patch diff --git a/99b03c1c18.patch b/99b03c1c18.patch new file mode 100644 index 0000000..2de5faf --- /dev/null +++ b/99b03c1c18.patch @@ -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" diff --git a/libomp.spec b/libomp.spec index 6e8f5bf..61119e9 100644 --- a/libomp.spec +++ b/libomp.spec @@ -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