[flang-commits] [flang] [Flang] Testcase changes to switch directories before rm (NFC) (PR #73602)

via flang-commits flang-commits at lists.llvm.org
Thu Nov 30 12:30:35 PST 2023


https://github.com/eddyz87 updated https://github.com/llvm/llvm-project/pull/73602

>From acf39956fd6310aea8b3ef42f84b61bbae732271 Mon Sep 17 00:00:00 2001
From: Mark Danial <madanial at dixon.rtp.raleigh.ibm.com>
Date: Mon, 27 Nov 2023 16:09:36 -0500
Subject: [PATCH 1/2] [Flang] TC changes to switch directories before rm (NFC)

---
 flang/test/Driver/write-module.f90 | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/flang/test/Driver/write-module.f90 b/flang/test/Driver/write-module.f90
index 0be5c5817ba9037..cf4be4306b6f569 100644
--- a/flang/test/Driver/write-module.f90
+++ b/flang/test/Driver/write-module.f90
@@ -9,6 +9,7 @@
 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
 ! RUN: cd %t && %flang -fsyntax-only -module-dir %t/dir-flang %s
 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
+! RUN: cd ..
 
 !--------------------------
 ! -module-dir<value>
@@ -16,6 +17,7 @@
 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
 ! RUN: cd %t && %flang -fsyntax-only -module-dir%t/dir-flang %s
 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
+! RUN: cd ..
 
 !---------------------------
 ! -J <value>
@@ -23,6 +25,7 @@
 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
 ! RUN: cd %t && %flang -fsyntax-only -J %t/dir-flang %s
 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
+! RUN: cd ..
 
 !------------------------------
 ! -J<value>
@@ -30,6 +33,7 @@
 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
 ! RUN: cd %t && %flang -fsyntax-only -J%t/dir-flang %s
 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
+! RUN: cd ..
 
 module testmodule
   type::t2

>From 4e70efbf052a3039a729bdfd6c5656789f7a57a1 Mon Sep 17 00:00:00 2001
From: Mark Danial <madanial at dixon.rtp.raleigh.ibm.com>
Date: Tue, 28 Nov 2023 10:24:34 -0500
Subject: [PATCH 2/2] cd - for future proofing

---
 flang/test/Driver/write-module.f90 | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/flang/test/Driver/write-module.f90 b/flang/test/Driver/write-module.f90
index cf4be4306b6f569..c4dbaddd4b27084 100644
--- a/flang/test/Driver/write-module.f90
+++ b/flang/test/Driver/write-module.f90
@@ -9,7 +9,7 @@
 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
 ! RUN: cd %t && %flang -fsyntax-only -module-dir %t/dir-flang %s
 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
-! RUN: cd ..
+! RUN: cd -
 
 !--------------------------
 ! -module-dir<value>
@@ -17,7 +17,7 @@
 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
 ! RUN: cd %t && %flang -fsyntax-only -module-dir%t/dir-flang %s
 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
-! RUN: cd ..
+! RUN: cd -
 
 !---------------------------
 ! -J <value>
@@ -25,7 +25,7 @@
 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
 ! RUN: cd %t && %flang -fsyntax-only -J %t/dir-flang %s
 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
-! RUN: cd ..
+! RUN: cd -
 
 !------------------------------
 ! -J<value>
@@ -33,7 +33,7 @@
 ! RUN: rm -rf %t && mkdir -p %t/dir-flang
 ! RUN: cd %t && %flang -fsyntax-only -J%t/dir-flang %s
 ! RUN: ls %t/dir-flang/testmodule.mod && not ls %t/testmodule.mod
-! RUN: cd ..
+! RUN: cd -
 
 module testmodule
   type::t2



More information about the flang-commits mailing list