summaryrefslogtreecommitdiffstatsci
path: root/scripts
diff options
context:
space:
mode:
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-07-15 13:48:04 +0200
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>2020-07-15 13:48:04 +0200
commita77dc464f91da554b5952ea965aa4b65cb0a511f (patch)
tree62c72758c7298600aa920a1e7b343670ea207086 /scripts
parente6b3bfbe53dbb850414ec7904b9f00e1aacc330d (diff)
copy tests from masternewvx-post-transform
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/batchTests.sh65
1 files changed, 65 insertions, 0 deletions
diff --git a/scripts/batchTests.sh b/scripts/batchTests.sh
new file mode 100755
index 0000000..b880572
--- /dev/null
+++ b/scripts/batchTests.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+#!/bin/bash
+today=`date '+%Y%m%d-%HH%MM%S'`;
+logdir=`pwd`
+
+POSITIONAL=()
+while [[ $# -gt 0 ]]
+do
+key="$1"
+
+case $key in
+ -i|--iterations)
+ ITERATIONS="$2"
+ shift # past argument
+ shift # past value
+ ;;
+ -s|--size)
+ SIZE="$2"
+ shift # past argument
+ shift # past value
+ ;;
+ -d|--directory)
+ TESTDIR="$2"
+ shift # past argument
+ shift # past value
+ ;;
+ *) # unknown option
+ POSITIONAL+=("$1") # save it in an array for later
+ shift # past argument
+ ;;
+esac
+done
+set -- "${POSITIONAL[@]}" # restore positional parameters
+
+if test -z "$TESTDIR"
+then
+ TESTDIR="."
+fi
+if test -z "$ITERATIONS"
+then
+ ITERATIONS="100"
+fi
+if test -z "$SIZE"
+then
+ SIZE="100"
+fi
+
+
+cd $TESTDIR
+
+logfile="$logdir/log-$today.txt"
+
+git log -n 1 --pretty=format:'%h %d %s%n%n' > $logfile
+
+echo "_____________________________________________________________________________________________________" >> $logfile
+echo "| Test File Name | Sub Test | Iter | SIZE | FPS | Average | Median | Sigma |" >> $logfile
+echo "|-----------------|---------------------------|------|------|---------|---------|---------|---------|" >> $logfile
+for file in test_*
+do
+ if [[ -x "$file" ]]
+ then
+ ./"$file" $ITERATIONS $SIZE >> $logfile
+ fi
+done
+echo "_____________________________________________________________________________________________________" >> $logfile