Files
clang-p2996/flang/test/Driver/write-module.f90
madanial0 9a485b02f9 [Flang] Testcase changes to switch directories before rm (NFC) (#73602)
In AIX, the following testcase fails in attempt to delete the current
directory, exiting current directory before removing

---------

Co-authored-by: Mark Danial <mmark.danial@ibm.com>
2023-11-30 17:45:21 -05:00

42 lines
1.3 KiB
Fortran

! Checks that the module file:
! * is _saved_
! * is saved in the _directory specified by the user_
! We use `-fsyntax-only` as it stops after the semantic checks (the module file is generated when sema checks are run)
!--------------------------
! -module-dir <value>
!--------------------------
! 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>
!--------------------------
! 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>
!---------------------------
! 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>
!------------------------------
! 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
end type
end