[Openmp-commits] [openmp] r350001 - [runtime] [test] Fix using %python path

Michal Gorny via Openmp-commits openmp-commits at lists.llvm.org
Sat Dec 22 02:51:53 PST 2018


Author: mgorny
Date: Sat Dec 22 02:51:53 2018
New Revision: 350001

URL: http://llvm.org/viewvc/llvm-project?rev=350001&view=rev
Log:
[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

Modified:
    openmp/trunk/runtime/test/affinity/format/affinity_display.1.c
    openmp/trunk/runtime/test/affinity/format/api.c
    openmp/trunk/runtime/test/affinity/format/api2.c
    openmp/trunk/runtime/test/affinity/format/increase.c
    openmp/trunk/runtime/test/affinity/format/nested.c
    openmp/trunk/runtime/test/affinity/format/nested2.c
    openmp/trunk/runtime/test/affinity/format/nested_mixed.c
    openmp/trunk/runtime/test/affinity/format/nested_serial.c
    openmp/trunk/runtime/test/affinity/format/proc_bind.c
    openmp/trunk/runtime/test/affinity/format/simple.c
    openmp/trunk/runtime/test/affinity/format/simple_env.c
    openmp/trunk/runtime/test/lit.cfg

Modified: openmp/trunk/runtime/test/affinity/format/affinity_display.1.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/affinity/format/affinity_display.1.c?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/affinity/format/affinity_display.1.c (original)
+++ openmp/trunk/runtime/test/affinity/format/affinity_display.1.c Sat Dec 22 02:51:53 2018
@@ -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>

Modified: openmp/trunk/runtime/test/affinity/format/api.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/affinity/format/api.c?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/affinity/format/api.c (original)
+++ openmp/trunk/runtime/test/affinity/format/api.c Sat Dec 22 02:51:53 2018
@@ -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>

Modified: openmp/trunk/runtime/test/affinity/format/api2.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/affinity/format/api2.c?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/affinity/format/api2.c (original)
+++ openmp/trunk/runtime/test/affinity/format/api2.c Sat Dec 22 02:51:53 2018
@@ -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>

Modified: openmp/trunk/runtime/test/affinity/format/increase.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/affinity/format/increase.c?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/affinity/format/increase.c (original)
+++ openmp/trunk/runtime/test/affinity/format/increase.c Sat Dec 22 02:51:53 2018
@@ -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>

Modified: openmp/trunk/runtime/test/affinity/format/nested.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/affinity/format/nested.c?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/affinity/format/nested.c (original)
+++ openmp/trunk/runtime/test/affinity/format/nested.c Sat Dec 22 02:51:53 2018
@@ -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>

Modified: openmp/trunk/runtime/test/affinity/format/nested2.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/affinity/format/nested2.c?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/affinity/format/nested2.c (original)
+++ openmp/trunk/runtime/test/affinity/format/nested2.c Sat Dec 22 02:51:53 2018
@@ -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>

Modified: openmp/trunk/runtime/test/affinity/format/nested_mixed.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/affinity/format/nested_mixed.c?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/affinity/format/nested_mixed.c (original)
+++ openmp/trunk/runtime/test/affinity/format/nested_mixed.c Sat Dec 22 02:51:53 2018
@@ -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>

Modified: openmp/trunk/runtime/test/affinity/format/nested_serial.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/affinity/format/nested_serial.c?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/affinity/format/nested_serial.c (original)
+++ openmp/trunk/runtime/test/affinity/format/nested_serial.c Sat Dec 22 02:51:53 2018
@@ -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>

Modified: openmp/trunk/runtime/test/affinity/format/proc_bind.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/affinity/format/proc_bind.c?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/affinity/format/proc_bind.c (original)
+++ openmp/trunk/runtime/test/affinity/format/proc_bind.c Sat Dec 22 02:51:53 2018
@@ -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>

Modified: openmp/trunk/runtime/test/affinity/format/simple.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/affinity/format/simple.c?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/affinity/format/simple.c (original)
+++ openmp/trunk/runtime/test/affinity/format/simple.c Sat Dec 22 02:51:53 2018
@@ -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>

Modified: openmp/trunk/runtime/test/affinity/format/simple_env.c
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/affinity/format/simple_env.c?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/affinity/format/simple_env.c (original)
+++ openmp/trunk/runtime/test/affinity/format/simple_env.c Sat Dec 22 02:51:53 2018
@@ -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>

Modified: openmp/trunk/runtime/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/test/lit.cfg?rev=350001&r1=350000&r2=350001&view=diff
==============================================================================
--- openmp/trunk/runtime/test/lit.cfg (original)
+++ openmp/trunk/runtime/test/lit.cfg Sat Dec 22 02:51:53 2018
@@ -124,6 +124,7 @@ config.substitutions.append(("%clangXX",
 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))




More information about the Openmp-commits mailing list