test suite: save timing info for graphs. #298

time-shift
Houtan Bastani 2015-09-10 17:10:00 +02:00
parent 5c006a4370
commit c6e75df544
2 changed files with 18 additions and 0 deletions

View File

@ -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

16
tests/create_timing_csv.sh Executable file
View File

@ -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