Skip to content

Commit 399ed80

Browse files
Pranavchikubonachea
authored andcommitted
XX: direcly use exit_status value
1 parent aed7bc4 commit 399ed80

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

test/test-assert-subroutine-error-termination.F90

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ program test_assert_subroutine_error_termination
2727
#elif _CRAYFTN
2828
command = "fpm run --example false-assertion --profile release --compiler crayftn.sh --flag '-DASSERTIONS' > /dev/null 2>&1", &
2929
#else
30-
command = "echo 'example/false_assertion.F90: unsupported compiler' && exit 1", &
30+
! For all other compilers, we assume that the default fpm command works
31+
command = "fpm run --example false-assertion --profile release --flag '-DASSERTIONS -ffree-line-length-0' > /dev/null 2>&1", &
3132
#endif
3233
wait = .true., &
3334
exitstat = exit_status &
@@ -49,11 +50,11 @@ program test_assert_subroutine_error_termination
4950
end block
5051
#else
5152
block
52-
integer unit
53-
open(newunit=unit, file="build/exit_status", status="old")
54-
read(unit,*) exit_status
53+
! integer unit
54+
! open(newunit=unit, file="build/exit_status", status="old")
55+
! read(unit,*) exit_status
5556
print *,trim(merge("passes","FAILS ",exit_status/=0)) // " on error-terminating when assertion = .false."
56-
close(unit)
57+
! close(unit)
5758
end block
5859
#endif
5960

0 commit comments

Comments
 (0)