[PATCH] D94243: [flang][driver] Copy input files into a temp dir when testing (nfc)
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 11 06:05:11 PST 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG8298ec2d6299: [flang][driver] Copy input files into a temp dir when testing (authored by awarzynski).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94243/new/
https://reviews.llvm.org/D94243
Files:
flang/test/Frontend/multiple-input-files.f90
Index: flang/test/Frontend/multiple-input-files.f90
===================================================================
--- flang/test/Frontend/multiple-input-files.f90
+++ flang/test/Frontend/multiple-input-files.f90
@@ -16,9 +16,13 @@
! FLANG FRONTEND DRIVER (flang-new -fc1)
!----------------------------------------
! TEST 3: Both input files are processed
-! RUN: %flang-new -fc1 -test-io %S/Inputs/hello-world.f90 %s 2>&1 \
-! RUN: && FileCheck %s --input-file=%S/multiple-input-files.txt --match-full-lines -check-prefix=FC1-OUTPUT1 \
-! RUN: && FileCheck %s --input-file=%S/Inputs/hello-world.txt --match-full-lines -check-prefix=FC1-OUTPUT2
+! This particular test case generates output files in the same directory as the input files. We need to copy the input files into a
+! temporary directory to avoid polluting the source directory.
+! RUN: rm -rf %t-dir && mkdir -p %t-dir && cd %t-dir
+! RUN: cp %s . && cp %S/Inputs/hello-world.f90 .
+! RUN: %flang-new -fc1 -test-io hello-world.f90 multiple-input-files.f90 2>&1 \
+! RUN: && FileCheck %s --input-file=multiple-input-files.txt --match-full-lines -check-prefix=FC1-OUTPUT1 \
+! RUN: && FileCheck %s --input-file=hello-world.txt --match-full-lines -check-prefix=FC1-OUTPUT2
! TEST 4: Only the last input file is processed
! RUN: %flang-new -fc1 -test-io %s %S/Inputs/hello-world.f90 -o %t 2>&1 \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D94243.315779.patch
Type: text/x-patch
Size: 1374 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210111/1f6f0c42/attachment.bin>
More information about the llvm-commits
mailing list