summaryrefslogtreecommitdiff
path: root/linarobench.sh
blob: c86c684a348d1013a486db70f6b69bd4416b1951 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/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