summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rwxr-xr-xllvm/test/Reduce/Inputs/remove-funcs.py1
-rw-r--r--llvm/test/Reduce/remove-funcs.ll13
-rw-r--r--llvm/test/Reduce/remove-global-vars.ll11
3 files changed, 21 insertions, 4 deletions
diff --git a/llvm/test/Reduce/Inputs/remove-funcs.py b/llvm/test/Reduce/Inputs/remove-funcs.py
index dc0203ce515..1d726c4e9ee 100755
--- a/llvm/test/Reduce/Inputs/remove-funcs.py
+++ b/llvm/test/Reduce/Inputs/remove-funcs.py
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
import sys
diff --git a/llvm/test/Reduce/remove-funcs.ll b/llvm/test/Reduce/remove-funcs.ll
index 5a9c48c7485..301b1941910 100644
--- a/llvm/test/Reduce/remove-funcs.ll
+++ b/llvm/test/Reduce/remove-funcs.ll
@@ -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() {
diff --git a/llvm/test/Reduce/remove-global-vars.ll b/llvm/test/Reduce/remove-global-vars.ll
index 956fd580452..8588de52b4c 100644
--- a/llvm/test/Reduce/remove-global-vars.ll
+++ b/llvm/test/Reduce/remove-global-vars.ll
@@ -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
OpenPOWER on IntegriCloud