aboutsummaryrefslogtreecommitdiff
path: root/break-up-bmks.sh
diff options
context:
space:
mode:
Diffstat (limited to 'break-up-bmks.sh')
-rwxr-xr-xbreak-up-bmks.sh44
1 files changed, 38 insertions, 6 deletions
diff --git a/break-up-bmks.sh b/break-up-bmks.sh
index 8e3e76a..212ffbf 100755
--- a/break-up-bmks.sh
+++ b/break-up-bmks.sh
@@ -118,13 +118,45 @@ if [ x"$board_selection" != x"balance" ]; then
exit
fi
+get_testsuite ()
+{
+ local bch bmks suite
+ bmks=$*
+
+ testsuite=""
+ # Which bench are we running exactly ?
+ for bch in $bmks; do
+ case ${bch} in
+ 4[0-9][0-9].*|99[89].specrand)
+ suite=cpu2006 ;;
+ 5[0-9][0-9].*|6[0-9][0-9].*|99[6789].specrand_[fi][rs])
+ suite=cpu2017 ;;
+ coremark)
+ suite=coremark ;;
+ *)
+ echo "ERROR: Option benchmark $bch not recognized"
+ exit 1
+ esac
+ if [ -z "$testsuite" ]; then
+ testsuite=$suite
+ elif [ "$testsuite" != "$suite" ]; then
+ echo ERROR: Option --bench cannot mix benches tests within a single run.
+ exit 1
+ fi
+ done
+}
+
+get_testsuite "${bmks[@]}"
+
n_cores=1 # e.g., stm32
-case "$bmk_hw" in
- "apm") n_cores=8 ;;
- "sq") n_cores=10 ;;
- "tk1") n_cores=4 ;;
- "tx1") n_cores=4 ;;
- "fx") n_cores=4 ;;
+case "$bmk_hw:$testsuite" in
+ apm:*) n_cores=8 ;;
+ sq:cpu2006) n_cores=24 ;;
+ sq:cpu2017) n_cores=10 ;;
+ tk1:*) n_cores=4 ;;
+ tx1:*) n_cores=4 ;;
+ fx:cpu2006) n_cores=20 ;;
+ fx:cpu2017) n_cores=4 ;;
esac
case "$run_profile" in
"serial") n_cores=1 ;;