@@ -12,6 +12,8 @@ program fpm_testing
1212 type (testsuite_t), allocatable :: testsuite(:)
1313 character (len=* ), parameter :: fmt = ' ("#", *(1x, a))'
1414
15+ stat = 0
16+
1517 testsuite = [ &
1618 & new_testsuite(" fpm_toml" , collect_toml), &
1719 & new_testsuite(" fpm_manifest" , collect_manifest), &
@@ -27,18 +29,13 @@ program fpm_testing
2729 if (allocated (test_name)) then
2830 write (error_unit, fmt) " Suite:" , testsuite(is)% name
2931 call run_selected(testsuite(is)% collect, test_name, error_unit, stat)
30- if (stat == - 1 ) then
32+ if (stat < 0 ) then
3133 error stop 1
3234 end if
3335 else
3436 write (error_unit, fmt) " Testing:" , testsuite(is)% name
3537 call run_testsuite(testsuite(is)% collect, error_unit, stat)
3638 end if
37-
38- if (stat > 0 ) then
39- write (error_unit, ' (i0, 1x, a)' ) stat, " test(s) failed!"
40- error stop 1
41- end if
4239 else
4340 write (error_unit, fmt) " Available testsuites"
4441 do is = 1 , size (testsuite)
@@ -50,14 +47,14 @@ program fpm_testing
5047 do is = 1 , size (testsuite)
5148 write (error_unit, fmt) " Testing:" , testsuite(is)% name
5249 call run_testsuite(testsuite(is)% collect, error_unit, stat)
53-
54- if (stat > 0 ) then
55- write (error_unit, ' (i0, 1x, a)' ) stat, " test(s) failed!"
56- error stop 1
57- end if
5850 end do
5951 end if
6052
53+ if (stat > 0 ) then
54+ write (error_unit, ' (i0, 1x, a)' ) stat, " test(s) failed!"
55+ error stop 1
56+ end if
57+
6158
6259contains
6360
0 commit comments