]> granicus.if.org Git - llvm/commitdiff
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371772 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 634ce93d7d83fb19e961be56e8003b2100aac45c..4823f751923ff94d021a6bef560adac55480fb77 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 d48e5734dd880645a1d0c3fb6f73cd45e9a59cac..6b3c86bea87bdc629008d69b1c0c09cc55364440 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 8f13c3d4a4f4da2c576b4a7f514254c5ff1c5488..900774762c19923e42baa94bfac9e6501d677248 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 94df1d8da2e010ca153d0effead59afde1e84bfa..b887737f3b347fbdc3f081fd4bd50eaaa717c4f0 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