Skip to content
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

update stat arg for apple #3726

Merged
merged 5 commits into from
Oct 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions fortran/testpar/subfiling.F90
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ PROGRAM subfiling_test
INTEGER(HID_T) :: driver_id

CHARACTER(len=8) :: hex1, hex2
CHARACTER(len=1) :: arg

!
! initialize MPI
Expand Down Expand Up @@ -336,10 +337,14 @@ PROGRAM subfiling_test
WRITE(*,"(A,A)") "Failed to find the stub subfile ",TRIM(filename)
nerrors = nerrors + 1
ENDIF

CALL EXECUTE_COMMAND_LINE("stat --format='%i' "//filename//" >> tmp_inode", EXITSTAT=i)
#if __APPLE__
arg(1:1)="f"
#else
arg(1:1)="c"
#endif
CALL EXECUTE_COMMAND_LINE("stat -"//arg(1:1)//" %i "//filename//" >> tmp_inode", EXITSTAT=i)
IF(i.ne.0)THEN
WRITE(*,"(A,A)") "Failed to stat the stub subfile ",TRIM(filename)
WRITE(*,"(A,A)") "Failed to stat the stub subfile ",TRIM(filename)
nerrors = nerrors + 1
ENDIF

Expand Down