subroutine RunTests(returnrc)
!
! !ARGUMENTS:
integer, intent( out) :: returnrc
!
! !DESCRIPTION:
! This routine controls the execution of the test harness tests
!-------------------------------------------------------------------------------
! local variables
integer :: kfile, kstr
integer :: localrc
! initialize local rc
returnrc = ESMF_RC_NOT_IMPL
localrc = ESMF_RC_NOT_IMPL
!-----------------------------------------------------------------------------
! select type of test result report
!-----------------------------------------------------------------------------
select case (trim(adjustL(har%testClass)))
!--------------------------------------------------------------------------
! Field Tests
!--------------------------------------------------------------------------
case("ARRAY")
do kfile=1,har%numRecords
do kstr=1,har%rcrd(kfile)%numStrings
!-----------------------------------------------------------------
! test of a single problem descriptor string w/ all specifiers
!-----------------------------------------------------------------
if(har%rcrd(kfile)%str(kstr)%process%tag == Harness_Redist) then
!--------------------------------------------------------------
! run the array test with redist
!--------------------------------------------------------------
call array_redist_test(har%rcrd(kfile)%str(kstr),har%failures,&
har%reportType, VM, localrc)
if (ESMF_LogFoundError(localrc,msg=" error array redist test", &
rcToReturn=returnrc)) return
else
!--------------------------------------------------------------
! run the array test with ssm
!--------------------------------------------------------------
! call array_regrid_test(har%rcrd(kfile)%str(kstr), &
! har%failures, har%reportType, VM, localrc)
! if (ESMF_LogFoundError(localrc," error array ssm test", &
! rcToReturn=returnrc)) return
endif
enddo ! kstr
enddo ! kfile
! case("ARRAYBUNDLE")
! return
!--------------------------------------------------------------------------
! Field Tests
!--------------------------------------------------------------------------
case("FIELD")
do kfile=1,har%numRecords
do kstr=1,har%rcrd(kfile)%numStrings
!-----------------------------------------------------------------
! test of a single problem descriptor string w/ all specifiers
!-----------------------------------------------------------------
if(har%rcrd(kfile)%str(kstr)%process%tag == Harness_Redist) then
!--------------------------------------------------------------
! run the field test with redist
!--------------------------------------------------------------
call field_redist_test(har%rcrd(kfile)%str(kstr), &
har%failures, har%reportType, VM, localrc)
if (ESMF_LogFoundError(localrc,msg=" error field redist test", &
rcToReturn=returnrc)) return
else
!--------------------------------------------------------------
! run the field test with regrid
!--------------------------------------------------------------
call field_regrid_test(har%rcrd(kfile)%str(kstr), &
har%failures, har%reportType, VM, localrc)
if (ESMF_LogFoundError(localrc,msg=" error field regrid test", &
rcToReturn=returnrc)) return
endif
enddo ! kstr
enddo ! kfile
! case("FIELDBUNDLE")
! return
case default
! error - class unknown
call ESMF_LogSetError( ESMF_FAILURE,msg=" test class of unknown type", &
rcToReturn=returnrc)
return
end select ! case of testclass
!-----------------------------------------------------------------------------
! if I've gotten this far without an error, then the routine has succeeded.
!-----------------------------------------------------------------------------
returnrc = ESMF_SUCCESS
!-----------------------------------------------------------------------------
end subroutine RunTests