[llvm] r371772 - Fix llvm-reduce tests so that they don't assume the source code is
Tim Shen via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 12 14:03:49 PDT 2019
Author: timshen
Date: Thu Sep 12 14:03:49 2019
New Revision: 371772
URL: http://llvm.org/viewvc/llvm-project?rev=371772&view=rev
Log:
Fix llvm-reduce tests so that they don't assume the source code is
writable.
Instead of copying over the original file permissions, just create
a new file and add the executable bit.
Modified:
llvm/trunk/test/Reduce/remove-args.ll
llvm/trunk/test/Reduce/remove-funcs.ll
llvm/trunk/test/Reduce/remove-global-vars.ll
llvm/trunk/test/Reduce/remove-metadata.ll
Modified: llvm/trunk/test/Reduce/remove-args.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Reduce/remove-args.ll?rev=371772&r1=371771&r2=371772&view=diff
==============================================================================
--- llvm/trunk/test/Reduce/remove-args.ll (original)
+++ llvm/trunk/test/Reduce/remove-args.ll Thu Sep 12 14:03:49 2019
@@ -2,12 +2,11 @@
;
; RUN: rm -rf %t
; RUN: mkdir %t
-; copy the test file to preserve executable bit
-; RUN: cp %p/Inputs/remove-args.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-args.py >> %t/test.py
+; RUN: chmod +x %t/test.py
; RUN: llvm-reduce --test %t/test.py %s -o %t/out.ll
; RUN: cat %t/out.ll | FileCheck -implicit-check-not=uninteresting %s
Modified: llvm/trunk/test/Reduce/remove-funcs.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Reduce/remove-funcs.ll?rev=371772&r1=371771&r2=371772&view=diff
==============================================================================
--- llvm/trunk/test/Reduce/remove-funcs.ll (original)
+++ llvm/trunk/test/Reduce/remove-funcs.ll Thu Sep 12 14:03:49 2019
@@ -3,12 +3,11 @@
;
; 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: chmod +x %t/test.py
; RUN: llvm-reduce --test %t/test.py %s -o %t/out.ll
; RUN: cat %t/out.ll | FileCheck -implicit-check-not=uninteresting %s
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=371772&r1=371771&r2=371772&view=diff
==============================================================================
--- llvm/trunk/test/Reduce/remove-global-vars.ll (original)
+++ llvm/trunk/test/Reduce/remove-global-vars.ll Thu Sep 12 14:03:49 2019
@@ -3,12 +3,11 @@
;
; 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: chmod +x %t/test.py
; RUN: llvm-reduce --test %t/test.py %s -o %t/out.ll
; RUN: cat %t/out.ll | FileCheck -implicit-check-not=uninteresting %s
Modified: llvm/trunk/test/Reduce/remove-metadata.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Reduce/remove-metadata.ll?rev=371772&r1=371771&r2=371772&view=diff
==============================================================================
--- llvm/trunk/test/Reduce/remove-metadata.ll (original)
+++ llvm/trunk/test/Reduce/remove-metadata.ll Thu Sep 12 14:03:49 2019
@@ -3,12 +3,11 @@
;
; RUN: rm -rf %t
; RUN: mkdir %t
-; copy the test file to preserve executable bit
-; RUN: cp %p/Inputs/remove-metadata.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-metadata.py >> %t/test.py
+; RUN: chmod +x %t/test.py
; RUN: llvm-reduce --test %t/test.py %s -o %t/out.ll
; RUN: cat %t/out.ll | FileCheck -implicit-check-not=! %s
More information about the llvm-commits
mailing list