summaryrefslogtreecommitdiff
path: root/openmp
diff options
context:
space:
mode:
authorMichal Gorny <mgorny@gentoo.org>2018-12-22 10:51:53 +0000
committerMichal Gorny <mgorny@gentoo.org>2018-12-22 10:51:53 +0000
commit210c8b1f9cf8edfa1faf485bda379a21ca14a4be (patch)
treef7b9b9855f3aa3948d1d8d0f1eb52e5556d30c12 /openmp
parent56d2e78e09ab86f6d82b30214a2ea6def722358c (diff)
[runtime] [test] Fix using %python path
Fix the newly-added tests to use %python substitution in order to use the correct path to Python interpreter. Otherwise, they fail on NetBSD where there is no 'python', just 'pythonX.Y'. Differential Revision: https://reviews.llvm.org/D56048
Diffstat (limited to 'openmp')
-rw-r--r--openmp/runtime/test/affinity/format/affinity_display.1.c2
-rw-r--r--openmp/runtime/test/affinity/format/api.c2
-rw-r--r--openmp/runtime/test/affinity/format/api2.c2
-rw-r--r--openmp/runtime/test/affinity/format/increase.c2
-rw-r--r--openmp/runtime/test/affinity/format/nested.c2
-rw-r--r--openmp/runtime/test/affinity/format/nested2.c2
-rw-r--r--openmp/runtime/test/affinity/format/nested_mixed.c2
-rw-r--r--openmp/runtime/test/affinity/format/nested_serial.c2
-rw-r--r--openmp/runtime/test/affinity/format/proc_bind.c2
-rw-r--r--openmp/runtime/test/affinity/format/simple.c12
-rw-r--r--openmp/runtime/test/affinity/format/simple_env.c2
-rw-r--r--openmp/runtime/test/lit.cfg1
12 files changed, 17 insertions, 16 deletions
diff --git a/openmp/runtime/test/affinity/format/affinity_display.1.c b/openmp/runtime/test/affinity/format/affinity_display.1.c
index b900c3c919a..fe357d3b389 100644
--- a/openmp/runtime/test/affinity/format/affinity_display.1.c
+++ b/openmp/runtime/test/affinity/format/affinity_display.1.c
@@ -1,5 +1,5 @@
// RUN: %libomp-compile
-// RUN: env OMP_DISPLAY_AFFINITY=TRUE OMP_NUM_THREADS=4 OMP_PLACES='{0,1},{2,3},{4,5},{6,7}' %libomp-run | python %S/check.py -c 'CHECK' %s
+// RUN: env OMP_DISPLAY_AFFINITY=TRUE OMP_NUM_THREADS=4 OMP_PLACES='{0,1},{2,3},{4,5},{6,7}' %libomp-run | %python %S/check.py -c 'CHECK' %s
// Affinity Display examples
#include <stdio.h>
diff --git a/openmp/runtime/test/affinity/format/api.c b/openmp/runtime/test/affinity/format/api.c
index df6be668021..08805e7a520 100644
--- a/openmp/runtime/test/affinity/format/api.c
+++ b/openmp/runtime/test/affinity/format/api.c
@@ -1,5 +1,5 @@
// RUN: %libomp-compile-and-run
-// RUN: %libomp-run | python %S/check.py -c 'CHECK' %s
+// RUN: %libomp-run | %python %S/check.py -c 'CHECK' %s
#include <stdio.h>
#include <stdlib.h>
diff --git a/openmp/runtime/test/affinity/format/api2.c b/openmp/runtime/test/affinity/format/api2.c
index 7b2d70084a2..c32da938f8d 100644
--- a/openmp/runtime/test/affinity/format/api2.c
+++ b/openmp/runtime/test/affinity/format/api2.c
@@ -1,5 +1,5 @@
// RUN: %libomp-compile-and-run
-// RUN: %libomp-run | python %S/check.py -c 'CHECK' %s
+// RUN: %libomp-run | %python %S/check.py -c 'CHECK' %s
#include <stdio.h>
#include <stdlib.h>
diff --git a/openmp/runtime/test/affinity/format/increase.c b/openmp/runtime/test/affinity/format/increase.c
index 46d8edb353f..b3942dbbc37 100644
--- a/openmp/runtime/test/affinity/format/increase.c
+++ b/openmp/runtime/test/affinity/format/increase.c
@@ -1,4 +1,4 @@
-// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true %libomp-run | python %S/check.py -c 'CHECK' %s
+// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true %libomp-run | %python %S/check.py -c 'CHECK' %s
#include <stdio.h>
#include <stdlib.h>
diff --git a/openmp/runtime/test/affinity/format/nested.c b/openmp/runtime/test/affinity/format/nested.c
index 502c1dae8c9..2ecc918973b 100644
--- a/openmp/runtime/test/affinity/format/nested.c
+++ b/openmp/runtime/test/affinity/format/nested.c
@@ -1,4 +1,4 @@
-// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true OMP_PLACES=threads OMP_PROC_BIND=spread,close %libomp-run | python %S/check.py -c 'CHECK' %s
+// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true OMP_PLACES=threads OMP_PROC_BIND=spread,close %libomp-run | %python %S/check.py -c 'CHECK' %s
// REQUIRES: affinity
#include <stdio.h>
diff --git a/openmp/runtime/test/affinity/format/nested2.c b/openmp/runtime/test/affinity/format/nested2.c
index 3dd4956d426..4b54912d29f 100644
--- a/openmp/runtime/test/affinity/format/nested2.c
+++ b/openmp/runtime/test/affinity/format/nested2.c
@@ -1,4 +1,4 @@
-// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true OMP_PLACES=threads OMP_PROC_BIND=spread,close KMP_HOT_TEAMS_MAX_LEVEL=2 %libomp-run | python %S/check.py -c 'CHECK' %s
+// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true OMP_PLACES=threads OMP_PROC_BIND=spread,close KMP_HOT_TEAMS_MAX_LEVEL=2 %libomp-run | %python %S/check.py -c 'CHECK' %s
#include <stdio.h>
#include <stdlib.h>
diff --git a/openmp/runtime/test/affinity/format/nested_mixed.c b/openmp/runtime/test/affinity/format/nested_mixed.c
index a39b4fdf452..1e4c7537277 100644
--- a/openmp/runtime/test/affinity/format/nested_mixed.c
+++ b/openmp/runtime/test/affinity/format/nested_mixed.c
@@ -1,4 +1,4 @@
-// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true %libomp-run | python %S/check.py -c 'CHECK' %s
+// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true %libomp-run | %python %S/check.py -c 'CHECK' %s
#include <stdio.h>
#include <stdlib.h>
diff --git a/openmp/runtime/test/affinity/format/nested_serial.c b/openmp/runtime/test/affinity/format/nested_serial.c
index 87ff2bd3361..8b84ba65ca1 100644
--- a/openmp/runtime/test/affinity/format/nested_serial.c
+++ b/openmp/runtime/test/affinity/format/nested_serial.c
@@ -1,4 +1,4 @@
-// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true %libomp-run | python %S/check.py -c 'CHECK' %s
+// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true %libomp-run | %python %S/check.py -c 'CHECK' %s
#include <stdio.h>
#include <stdlib.h>
diff --git a/openmp/runtime/test/affinity/format/proc_bind.c b/openmp/runtime/test/affinity/format/proc_bind.c
index e88e1aaac82..765c3ceaaf9 100644
--- a/openmp/runtime/test/affinity/format/proc_bind.c
+++ b/openmp/runtime/test/affinity/format/proc_bind.c
@@ -1,4 +1,4 @@
-// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true OMP_PLACES='{0},{0,1},{0},{0,1},{0},{0,1},{0},{0,1},{0},{0,1},{0}' %libomp-run | python %S/check.py -c 'CHECK' %s
+// RUN: %libomp-compile && env OMP_DISPLAY_AFFINITY=true OMP_PLACES='{0},{0,1},{0},{0,1},{0},{0,1},{0},{0,1},{0},{0,1},{0}' %libomp-run | %python %S/check.py -c 'CHECK' %s
// REQUIRES: affinity
#include <stdio.h>
diff --git a/openmp/runtime/test/affinity/format/simple.c b/openmp/runtime/test/affinity/format/simple.c
index 954aa7477b1..701c207200d 100644
--- a/openmp/runtime/test/affinity/format/simple.c
+++ b/openmp/runtime/test/affinity/format/simple.c
@@ -1,10 +1,10 @@
// RUN: %libomp-compile
-// RUN: env OMP_DISPLAY_AFFINITY=false %libomp-run | python %S/check.py -c 'NOTHING' %s
-// RUN: env OMP_DISPLAY_AFFINITY=true OMP_NUM_THREADS=1 %libomp-run | python %S/check.py -c 'CHECK' %s
-// RUN: env OMP_DISPLAY_AFFINITY=true OMP_NUM_THREADS=2 %libomp-run | python %S/check.py -c 'CHECK-2' %s
-// RUN: env OMP_DISPLAY_AFFINITY=true OMP_NUM_THREADS=3 %libomp-run | python %S/check.py -c 'CHECK-3' %s
-// RUN: env OMP_DISPLAY_AFFINITY=true OMP_NUM_THREADS=4 %libomp-run | python %S/check.py -c 'CHECK-4' %s
-// RUN: env OMP_DISPLAY_AFFINITY=true OMP_NUM_THREADS=8 %libomp-run | python %S/check.py -c 'CHECK-8' %s
+// RUN: env OMP_DISPLAY_AFFINITY=false %libomp-run | %python %S/check.py -c 'NOTHING' %s
+// RUN: env OMP_DISPLAY_AFFINITY=true OMP_NUM_THREADS=1 %libomp-run | %python %S/check.py -c 'CHECK' %s
+// RUN: env OMP_DISPLAY_AFFINITY=true OMP_NUM_THREADS=2 %libomp-run | %python %S/check.py -c 'CHECK-2' %s
+// RUN: env OMP_DISPLAY_AFFINITY=true OMP_NUM_THREADS=3 %libomp-run | %python %S/check.py -c 'CHECK-3' %s
+// RUN: env OMP_DISPLAY_AFFINITY=true OMP_NUM_THREADS=4 %libomp-run | %python %S/check.py -c 'CHECK-4' %s
+// RUN: env OMP_DISPLAY_AFFINITY=true OMP_NUM_THREADS=8 %libomp-run | %python %S/check.py -c 'CHECK-8' %s
#include <stdio.h>
#include <stdlib.h>
diff --git a/openmp/runtime/test/affinity/format/simple_env.c b/openmp/runtime/test/affinity/format/simple_env.c
index 7aab1cfc04c..ad0a2651e36 100644
--- a/openmp/runtime/test/affinity/format/simple_env.c
+++ b/openmp/runtime/test/affinity/format/simple_env.c
@@ -1,5 +1,5 @@
// RUN: %libomp-compile
-// RUN: env OMP_DISPLAY_AFFINITY=true OMP_AFFINITY_FORMAT='TESTER-ENV: tl:%L tn:%n nt:%N' OMP_NUM_THREADS=8 %libomp-run | python %S/check.py -c 'CHECK-8' %s
+// RUN: env OMP_DISPLAY_AFFINITY=true OMP_AFFINITY_FORMAT='TESTER-ENV: tl:%L tn:%n nt:%N' OMP_NUM_THREADS=8 %libomp-run | %python %S/check.py -c 'CHECK-8' %s
#include <stdio.h>
#include <stdlib.h>
diff --git a/openmp/runtime/test/lit.cfg b/openmp/runtime/test/lit.cfg
index 066929e5f42..02abba03d4f 100644
--- a/openmp/runtime/test/lit.cfg
+++ b/openmp/runtime/test/lit.cfg
@@ -124,6 +124,7 @@ config.substitutions.append(("%clangXX", config.test_cxx_compiler))
config.substitutions.append(("%clang", config.test_c_compiler))
config.substitutions.append(("%openmp_flags", config.test_openmp_flags))
config.substitutions.append(("%flags", config.test_flags))
+config.substitutions.append(("%python", '"%s"' % (sys.executable)))
if config.has_ompt:
config.substitutions.append(("FileCheck", config.test_filecheck))