Skip to content

Commit b0f43cc

Browse files
rousonbonachea
authored andcommitted
fix(test): restrict output to image 1
1 parent 5477126 commit b0f43cc

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@ program test_assert_subroutine_error_termination
77

88
integer exit_status
99

10-
print *
11-
print *,"The assert subroutine"
10+
#if ASSERT_MULTI_IMAGE
11+
if (this_image()==1) then
12+
#endif
13+
14+
print *, new_line(''), "The assert subroutine"
15+
16+
#if ASSERT_MULTI_IMAGE
17+
end if
18+
#endif
1219

1320
! TODO: The following is a HORRIBLY fragile test.
1421
! Specifically, it encodes a bunch of compiler-specific flags into an fpm command,

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

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,26 @@ program test_assert_subroutine_normal_termination
55
use assert_m, only : assert
66
implicit none
77

8-
print *
9-
print *,"The assert subroutine"
8+
#if ASSERT_MULTI_IMAGE
9+
if (this_image()==1) then
10+
#endif
11+
print *, new_line(''), "The assert subroutine"
12+
#if ASSERT_MULTI_IMAGE
13+
end if
14+
sync all
15+
#endif
1016

1117
call assert(assertion = .true., description = "3 keyword arguments ")
1218
call assert( .true., description = "2 keyword arguments ")
1319
call assert( .true., "no optional argument")
20+
1421
#if ASSERT_MULTI_IMAGE
15-
sync all
16-
if (this_image()==1) &
22+
sync all
23+
if (this_image()==1) then
1724
#endif
1825
print *," passes on not error-terminating when assertion=.true."
26+
#if ASSERT_MULTI_IMAGE
27+
end if
28+
#endif
1929

2030
end program

0 commit comments

Comments
 (0)