Skip to content

Commit

Permalink
Merge pull request #3 from apcraig/travis
Browse files Browse the repository at this point in the history
update travis suite and add quiet mode to scripts
  • Loading branch information
anders-dc authored Mar 30, 2018
2 parents b3c781f + 6be69e4 commit b871231
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 10 deletions.
8 changes: 6 additions & 2 deletions cice.setup
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ set argv = ( $initargv[*] )
while (1)
if ($#argv < 1) break;
if ("$argv[1]" =~ "--version" ) then
echo "This is Cice ${versno}"
echo "This is CICE ${versno}"
exit -1
endif
shift argv
Expand Down Expand Up @@ -106,7 +106,7 @@ EXAMPLES
SEE ALSO
cice.setup --help or
User Documentation at https://cice-consortium.github.io/Cice/
User Documentation at https://github.com/cice-consortium/cice/
EOF1

Expand Down Expand Up @@ -545,6 +545,10 @@ setenv ICE_BASECOM ${baseCom}
setenv ICE_SPVAL ${spval}
EOF1
if ($?ICE_MACHINE_QUIETMODE) then
echo "setenv ICE_QUIETMODE ${ICE_MACHINE_QUIETMODE}" >> ${fsmods}
endif
if ($bfbcomp != $spval) then
echo "setenv ICE_BFBCOMP ${machcomp}_${bfbcomp}.${testid}" >> ${fsmods}
else
Expand Down
35 changes: 28 additions & 7 deletions configuration/scripts/cice.build
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ echo "${0}:"

set stamp = `date '+%y%m%d-%H%M%S'`
set ICE_BLDLOG_FILE = "cice.bldlog.${stamp}"
set quiet = ${ICE_QUIETMODE}

if (${ICE_CLEANBUILD} == 'true') then
echo "cleaning objdir"
Expand Down Expand Up @@ -90,18 +91,40 @@ if (-e ${ICE_BLDLOG_FILE}) rm ${ICE_BLDLOG_FILE}

if (${ICE_CLEANBUILD} == 'true') then
echo "gmake clean"
${ICE_MACHINE_MAKE} VPFILE=Filepath EXEC=${ICE_RUNDIR}/icepack \
CPPDEFS="${ICE_CPPDEFS}" \
-f ${ICE_CASEDIR}/Makefile MACFILE=${ICE_CASEDIR}/Macros.${ICE_MACHCOMP} clean | tee ${ICE_BLDLOG_FILE}
if (${quiet} == "true") then
${ICE_MACHINE_MAKE} VPFILE=Filepath EXEC=${ICE_RUNDIR}/icepack \
CPPDEFS="${ICE_CPPDEFS}" \
-f ${ICE_CASEDIR}/Makefile MACFILE=${ICE_CASEDIR}/Macros.${ICE_MACHCOMP} clean >& ${ICE_BLDLOG_FILE}
else
${ICE_MACHINE_MAKE} VPFILE=Filepath EXEC=${ICE_RUNDIR}/icepack \
CPPDEFS="${ICE_CPPDEFS}" \
-f ${ICE_CASEDIR}/Makefile MACFILE=${ICE_CASEDIR}/Macros.${ICE_MACHCOMP} clean | tee ${ICE_BLDLOG_FILE}
endif
endif

${ICE_MACHINE_MAKE} -j ${ICE_MACHINE_BLDTHRDS} VPFILE=Filepath EXEC=${ICE_RUNDIR}/cice \
echo "gmake cice"
if (${quiet} == "true") then
echo " quiet mode on... patience"
${ICE_MACHINE_MAKE} -j ${ICE_MACHINE_BLDTHRDS} VPFILE=Filepath EXEC=${ICE_RUNDIR}/cice \
CPPDEFS="${ICE_CPPDEFS}" \
-f ${ICE_CASEDIR}/Makefile MACFILE=${ICE_CASEDIR}/Macros.${ICE_MACHCOMP} >& ${ICE_BLDLOG_FILE}
set bldstat = ${status}
else
${ICE_MACHINE_MAKE} -j ${ICE_MACHINE_BLDTHRDS} VPFILE=Filepath EXEC=${ICE_RUNDIR}/cice \
CPPDEFS="${ICE_CPPDEFS}" \
-f ${ICE_CASEDIR}/Makefile MACFILE=${ICE_CASEDIR}/Macros.${ICE_MACHCOMP} | tee ${ICE_BLDLOG_FILE}
set bldstat = ${status}
endif

if ($status != 0) then
if !(-d ${ICE_LOGDIR}) mkdir -p ${ICE_LOGDIR}
cp -p ${ICE_BLDLOG_FILE} ${ICE_LOGDIR}/

if (${bldstat} != 0) then
echo "${0}: COMPILE FAILED, see"
echo " cat ${ICE_OBJDIR}/${ICE_BLDLOG_FILE}"
if (${quiet} == "true") then
tail -10 ${ICE_OBJDIR}/${ICE_BLDLOG_FILE}
endif
if ( ${ICE_TEST} != ${ICE_SPVAL} ) then
# This is a test case. Write output to test_output file
echo "FAIL ${ICE_TESTNAME} build" >> ${ICE_CASEDIR}/test_output
Expand All @@ -110,8 +133,6 @@ if ($status != 0) then
exit 99
endif

if !(-d ${ICE_LOGDIR}) mkdir -p ${ICE_LOGDIR}
cp -p ${ICE_BLDLOG_FILE} ${ICE_LOGDIR}/
echo "`date` ${0}:${ICE_CASENAME} build completed ${ICE_BLDLOG_FILE}" >> ${ICE_CASEDIR}/README.case
echo "${0}: COMPILE SUCCESSFUL, ${ICE_LOGDIR}/${ICE_BLDLOG_FILE}"
if ( ${ICE_TEST} != ${ICE_SPVAL} ) then
Expand Down
1 change: 1 addition & 0 deletions configuration/scripts/cice.settings
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ setenv ICE_DRVOPT cice
setenv ICE_CONSTOPT cice
setenv ICE_IOTYPE netcdf # set to none if netcdf library is unavailable
setenv ICE_CLEANBUILD true
setenv ICE_QUIETMODE false
setenv ICE_GRID gx3
setenv ICE_NXGLOB 100
setenv ICE_NYGLOB 116
Expand Down
4 changes: 3 additions & 1 deletion configuration/scripts/tests/travis_suite.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Test Grid PEs Sets BFB-compare
smoke gx3 1x2 diag1,run5day
smoke gx3 2x1 debug,diag1,run5day
smoke gx3 1x2 debug,diag1,run5day
smoke gx3 1x1 diag1,run5day
smoke gx3 2x1 diag1,run5day smoke_gx3_1x1_diag1_run5day
smoke gx3 1x2 diag1,run5day
smoke gx3 1x1 diag1,run5day,thread smoke_gx3_1x2_diag1_run5day
smoke gx3 2x1 diag1,run5day,thread smoke_gx3_1x2_diag1_run5day
restart gx3 2x1 diag1
Expand Down

0 comments on commit b871231

Please sign in to comment.