Skip to content

[Flang] Modify module test to run in a sub-directory #123364

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 20, 2025

Conversation

kiranchandramohan
Copy link
Contributor

This is to avoid race conditions with other tests.

@llvmbot llvmbot added flang Flang issues not falling into any other category flang:fir-hlfir labels Jan 17, 2025
@llvmbot
Copy link
Member

llvmbot commented Jan 17, 2025

@llvm/pr-subscribers-flang-fir-hlfir

Author: Kiran Chandramohan (kiranchandramohan)

Changes

This is to avoid race conditions with other tests.


Full diff: https://github.com/llvm/llvm-project/pull/123364.diff

1 Files Affected:

  • (modified) flang/test/Lower/module_use.f90 (+3-3)
diff --git a/flang/test/Lower/module_use.f90 b/flang/test/Lower/module_use.f90
index b976663239ef5a..f7c610c9ad22ed 100644
--- a/flang/test/Lower/module_use.f90
+++ b/flang/test/Lower/module_use.f90
@@ -1,6 +1,6 @@
-! RUN: rm -fr %t && mkdir -p %t
-! RUN: bbc -emit-fir -module %t %S/module_definition.f90
-! RUN: bbc -emit-fir -J %t %s -o - | FileCheck %s
+! RUN: rm -fr %t && mkdir -p %t && cd %t
+! RUN: bbc -emit-fir %S/module_definition.f90
+! RUN: bbc -emit-fir %s -o - | FileCheck %s
 
 ! Test use of module data not defined in this file.
 ! The modules are defined in module_definition.f90

Copy link
Contributor

@tarunprabhu tarunprabhu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Kiran.

I think -module and -I (instead of -J) would also work here. But cd is fine too. There is precedent for doing this in clang as well.

Copy link
Contributor

@jeanPerier jeanPerier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@kiranchandramohan kiranchandramohan merged commit 4d21096 into llvm:main Jan 20, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:fir-hlfir flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants