diff --git a/tests/Makefile.am b/tests/Makefile.am index 1241bbaa4..29333b870 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -467,10 +467,12 @@ check-local: $(TARGETS) check-matlab: $(M_XFAIL_TRS_FILES) $(M_TRS_FILES) ./read_trs_files.sh "$(M_TRS_FILES)" "$(M_XFAIL_TRS_FILES)" + ./create_timing_csv.sh "$(M_TRS_FILES)" "$(M_XFAIL_TRS_FILES)" @echo 'Matlab Tests Done' check-octave: $(O_XFAIL_TRS_FILES) $(O_TRS_FILES) ./read_trs_files.sh "$(O_TRS_FILES)" "$(O_XFAIL_TRS_FILES)" + ./create_timing_csv.sh "$(O_TRS_FILES)" "$(O_XFAIL_TRS_FILES)" @echo 'Octave Tests Done' %.m.trs %.m.log: %.mod diff --git a/tests/create_timing_csv.sh b/tests/create_timing_csv.sh new file mode 100755 index 000000000..7ab5d1fc6 --- /dev/null +++ b/tests/create_timing_csv.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +DATE=`date +%Y%m%d` +CSVDIR="/home/dynbot/testSuiteTiming" +if [ ! -d $CSVDIR ]; then + mkdir -p $CSVDIR +fi + +for file in $1 $2; do + time=`grep cputime $file | cut -d: -f3 | sed -e 's/^[[:space:]]*//' | sed -e 's/[[:space:]]*$//'` + csvfile=`echo $file | sed 's/\//-/g' | sed 's/\.trs$/\.csv/g'` + if [ ! -f $CSVDIR/$csvfile ]; then + `touch $CSVDIR/$csvfile` + fi + echo $DATE,$time >> $CSVDIR/$csvfile +done