Fix llvm-reduce tests so that they don't assume the source code is
authorTim Shen <timshen91@gmail.com>
Thu, 12 Sep 2019 21:03:49 +0000 (21:03 +0000)
committerTim Shen <timshen91@gmail.com>
Thu, 12 Sep 2019 21:03:49 +0000 (21:03 +0000)
writable.

Instead of copying over the original file permissions, just create
a new file and add the executable bit.

llvm-svn: 371772

llvm/test/Reduce/remove-args.ll
llvm/test/Reduce/remove-funcs.ll
llvm/test/Reduce/remove-global-vars.ll
llvm/test/Reduce/remove-metadata.ll

index 634ce93..4823f75 100644 (file)
@@ -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
index d48e573..6b3c86b 100644 (file)
@@ -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
index 8f13c3d..9007747 100644 (file)
@@ -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
index 94df1d8..b887737 100644 (file)
@@ -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