#!/bin/bash #These scripts take two sets of parameters, separated by -- #When invoked through cbuild2:scripts/benchmark.sh: #The lhs (board_benchargs) comes from the board config file (e.g. cbuild2:config/boards/bench/juno-a57.conf) #The rhs (run_benchargs) comes from the CLI of benchmark.sh #The lhs is processed by this script #The rhs is passed through to whatever this script invokes #There is some wiggle room, depending on the behaviour of the benchmark under control of linarobench.sh for x in "$@"; do shift if test x"$x" = 'x--'; then break fi board_benchargs=("${board_benchargs[@]}" "$x") done if test $# -eq 0; then run_benchargs=() else run_benchargs=("$@") fi rm -f linarobenchlog echo "LHS" >> linarobenchlog for x in "${board_benchargs[@]}" thing="`uname -a`"; do echo "$x" >> linarobenchlog done echo "RHS" >> linarobenchlog for x in "${run_benchargs[@]}"; do echo "$x" >> linarobenchlog done eval make RUN_ARGS="'${run_benchargs[@]}'" -C fake check >> linarobenchlog