[Dart-dev] DART/branches Revision: 13114

dart at ucar.edu dart at ucar.edu
Tue Apr 16 16:08:50 MDT 2019


nancy at ucar.edu
2019-04-16 16:08:50 -0600 (Tue, 16 Apr 2019)
210
fix up the developers test file to log to a reasonable
name and have less junk in the output.

make the top level 'test_dart.csh' script have an MPI
option (for now, the default) and call the new sub-scripts.




Modified: DART/branches/rma_trunk/developer_tests/run_tests.csh
===================================================================
--- DART/branches/rma_trunk/developer_tests/run_tests.csh	2019-04-16 17:49:24 UTC (rev 13113)
+++ DART/branches/rma_trunk/developer_tests/run_tests.csh	2019-04-16 22:08:50 UTC (rev 13114)
@@ -14,7 +14,6 @@
 
 set usingmpi=no
 set MPICMD=""
-set LOGDIR=`pwd`/testing_logs
 
 if ( $#argv > 0 ) then
   if ( "$argv[1]" == "-mpi" ) then
@@ -60,21 +59,18 @@
   exit -1
 endif
 
-#----------------------------------------------------------------------
+# prevent shell warning messages about no files found when trying
+# to remove files using wildcards.
+set nonomatch
 
+set LOGDIR=`pwd`/testing_logs
+
 if ( ! $?REMOVE) then
    setenv REMOVE 'rm -f'
 endif
-if ( ! $?REMOVE_DIR) then
-   setenv REMOVE_DIR 'rmdir'
-endif
-if ( ! $?COPY) then
-   setenv COPY 'cp -f'
-endif
-if ( ! $?MOVE) then
-   setenv MOVE 'mv -f'
-endif
 
+#----------------------------------------------------------------------
+
 if ( ! $?host) then
    setenv host `uname -n`
 endif
@@ -93,15 +89,18 @@
 # Compile and run all executables 
 #----------------------------------------------------------------------
 
+${REMOVE} -r $LOGDIR
 mkdir -p $LOGDIR
-\rm -f $LOGDIR/*
-echo putting build and run logs in $LOGDIR
 
+echo see $LOGDIR
+echo for build and run logs
+
 @ testnum = 0
 
 foreach TESTFILE ( $HAS_TESTS ) 
     
     set TESTDIR = `dirname $TESTFILE`
+    set LOGNAME = `echo $TESTDIR | sed -e 's;/[^/]*$;;' -e 's;/;_;g'`
 
     echo
     echo
@@ -114,7 +113,7 @@
     cd ${TESTDIR}
     set FAILURE = 0
 
-    ( ./quickbuild.csh ${QUICKBUILD_ARG} > ${LOGDIR}/buildlog.${TESTDIR}.out ) || set FAILURE = 1
+    ( ./quickbuild.csh ${QUICKBUILD_ARG} > ${LOGDIR}/buildlog.${LOGNAME}.out ) || set FAILURE = 1
 
     @ testnum = $testnum + 1
 
@@ -128,11 +127,6 @@
       continue
     else
       echo "=================================================================="
-      echo "End of successful build in $TESTDIR at "`date`
-      echo "=================================================================="
-      echo
-      echo
-      echo "=================================================================="
       echo "Running tests in $TESTDIR starting at "`date`
       echo "=================================================================="
       echo
@@ -140,24 +134,23 @@
   
       foreach TARGET ( mkmf_* )
   
-           \rm -f *.o *.mod
-           \rm -f Makefile input.nml.*_default .cppdefs
 
+           set FAILURE = 0
            set PROG = `echo $TARGET | sed -e 's#mkmf_##'`
-           echo "++++++++++++++++++"
+         
            echo Starting $PROG
-           ( ${MPICMD} ./$PROG  > ${LOGDIR}/runlog.${TESTDIR}.out ) || set FAILURE = 1
-           echo Finished $PROG
-           echo
+           ( ${MPICMD} ./$PROG  > ${LOGDIR}/runlog.${LOGNAME}.${PROG}.out ) || set FAILURE = 1
            if ( $FAILURE ) then
-              echo "ERROR - unsuccessful run in $TESTDIR at "`date`


More information about the Dart-dev mailing list