[llvm] r371143 - llvm-reduce: Use %python from lit to get the correct/valid python binary for the reduction script

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 16:33:44 PDT 2019


Author: dblaikie
Date: Thu Sep  5 16:33:44 2019
New Revision: 371143

URL: http://llvm.org/viewvc/llvm-project?rev=371143&view=rev
Log:
llvm-reduce: Use %python from lit to get the correct/valid python binary for the reduction script

Modified:
    llvm/trunk/test/Reduce/Inputs/remove-funcs.py
    llvm/trunk/test/Reduce/remove-funcs.ll
    llvm/trunk/test/Reduce/remove-global-vars.ll

Modified: llvm/trunk/test/Reduce/Inputs/remove-funcs.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Reduce/Inputs/remove-funcs.py?rev=371143&r1=371142&r2=371143&view=diff
==============================================================================
--- llvm/trunk/test/Reduce/Inputs/remove-funcs.py (original)
+++ llvm/trunk/test/Reduce/Inputs/remove-funcs.py Thu Sep  5 16:33:44 2019
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 
 import sys
 

Modified: llvm/trunk/test/Reduce/remove-funcs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Reduce/remove-funcs.ll?rev=371143&r1=371142&r2=371143&view=diff
==============================================================================
--- llvm/trunk/test/Reduce/remove-funcs.ll (original)
+++ llvm/trunk/test/Reduce/remove-funcs.ll Thu Sep  5 16:33:44 2019
@@ -1,8 +1,17 @@
 ; Test that llvm-reduce can remove uninteresting functions as well as
 ; their InstCalls.
 ;
-; RUN: llvm-reduce --test %p/Inputs/remove-funcs.py %s -o - | FileCheck %s
-; REQUIRES: plugins, shell
+; RUN: rm -rf %t
+; RUN: mkdir %t
+; copy the test file to preserve executable bit
+; RUN: cp %p/Inputs/remove-funcs.py %t/test.py
+; get the python path from lit
+; RUN: echo "#!" %python > %t/test.py
+; then include the rest of the test script
+; RUN: cat %p/Inputs/remove-funcs.py >> %t/test.py
+
+; RUN: llvm-reduce --test %t/test.py %s -o - | FileCheck %s
+; REQUIRES: plugins
 
 ; CHECK-NOT: uninteresting1()
 define i32 @uninteresting1() {

Modified: llvm/trunk/test/Reduce/remove-global-vars.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Reduce/remove-global-vars.ll?rev=371143&r1=371142&r2=371143&view=diff
==============================================================================
--- llvm/trunk/test/Reduce/remove-global-vars.ll (original)
+++ llvm/trunk/test/Reduce/remove-global-vars.ll Thu Sep  5 16:33:44 2019
@@ -1,7 +1,16 @@
 ; Test that llvm-reduce can remove uninteresting Global Variables as well as
 ; their direct uses (which in turn are replaced with 'undef').
 ;
-; RUN: llvm-reduce --test %p/Inputs/remove-global-vars.py %s -o - | FileCheck %s
+; RUN: rm -rf %t
+; RUN: mkdir %t
+; copy the test file to preserve executable bit
+; RUN: cp %p/Inputs/remove-global-vars.py %t/test.py
+; get the python path from lit
+; RUN: echo "#!" %python > %t/test.py
+; then include the rest of the test script
+; RUN: cat %p/Inputs/remove-global-vars.py >> %t/test.py
+
+; RUN: llvm-reduce --test %t/test.py %s -o - | FileCheck %s
 ; REQUIRES: plugins
 
 ; CHECK: @interesting = global




More information about the llvm-commits mailing list