Skip to content

Commit

Permalink
(radiation) skip inside test_radiation not in testsuite if do_radiati…
Browse files Browse the repository at this point in the history
…on=false
  • Loading branch information
danieljprice committed Apr 16, 2020
1 parent 13ae0e1 commit 1f952ea
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
5 changes: 5 additions & 0 deletions src/tests/test_radiation.F90
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,13 @@ module testradiation
subroutine test_radiation(ntests,npass)
use physcon, only:solarm,au
use units, only:set_units
use dim, only:do_radiation
integer, intent(inout) :: ntests,npass

if (.not.do_radiation) then
if (id==master) write(*,"(/,a,/)") '--> SKIPPING RADIATION TEST (NEED RADIATION=yes)'
return
endif
if (id==master) write(*,"(/,a,/)") '--> TESTING RADIATION MODULE'

call set_units(dist=au,mass=solarm,G=1.d0)
Expand Down
10 changes: 2 additions & 8 deletions src/tests/testsuite.F90
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ subroutine testsuite(string,first,last,ntests,npass,nfail)
call set_default_options ! restore defaults
endif
#endif

!
!--test of set_disc module
!
Expand All @@ -337,13 +336,8 @@ subroutine testsuite(string,first,last,ntests,npass,nfail)
endif

if (doradiation.or.testall) then
if (do_radiation) then
call test_radiation(ntests,npass)
call set_default_options ! restore defaults
call barrier_mpi()
else
print*, 'Radiation: Compiled without RADIATION=yes. Skip.'
endif
call test_radiation(ntests,npass)
call set_default_options ! restore defaults
endif
!
!--now do a "real" calculation, putting it all together (Sedov blast wave)
Expand Down

0 comments on commit 1f952ea

Please sign in to comment.