5 -P) OPT_PLOT_DISABLE=1; shift;;
6 -p) OPT_PLOT_ONLY=1; shift;;
7 -X|--no-x11-plot) OPT_NO_X11=1; shift;;
11 PATH=$PWD/../_compiled/bin/:$PATH
21 local socket="$HOME/.ssh/cangw-connection"
23 if [[ ! -S $socket ]]; then
24 # Create master connection to speed up subsequenct command.
25 # The ssh is put into background and the connection is closed
27 ssh -f -M -S $socket root@192.168.2.3 sleep 600 > /dev/null 2>&1
29 ssh -x -a -S $socket root@192.168.2.3 "$@"
37 local testname=`basename $0 .sh`
39 plot_cmds | sed -e "/set title/ s/[\"']\(.*\)[\"']/\"\1\\\\n($kvers)\"/" > plot.gp
40 if [ -z "$OPT_NO_X11" ]; then
41 echo "set terminal x11 enhanced; $(< plot.gp)" | gnuplot -persist
44 echo 'set terminal postscript color eps enhanced size 6cm,4cm lw 1 "Times-Roman" 10;' \
46 "$(< plot.gp)" | gnuplot > ${testname}$I.eps
47 echo "set terminal postscript color eps enhanced;" \
48 "$(< plot.gp)" | gnuplot | epstopdf --filter > ${testname}$I.pdf
50 convert -density 30 -gamma 0.5 -quality 90 -type Palette -depth 8 ${testname}$I.pdf thumb/${testname}$I.png
51 convert -density 150 -gamma 0.7 -quality 90 -type Palette -depth 8 ${testname}$I.pdf ${testname}$I.png
55 create_dirs_and_links() {
59 local d=results/by-kern/$kver/$test
61 mkdir -p results/by-test/$test
62 ln -sfT ../../${d#results/} results/by-test/$test/$kver
68 [[ "$_plot_separator" ]] && echo ", \\"
74 if [[ ! "$OPT_PLOT_ONLY" ]]; then
75 kernel_versions=$(sshgw uname -r)
77 kernel_versions=$(ls results/by-kern)
79 for kvers in $kernel_versions; do
80 dir=$(create_dirs_and_links $(basename $0 .sh) $kvers)
83 echo "Working directory: $dir"
84 if [[ ! "$OPT_PLOT_ONLY" ]]; then
85 # Remove data from the last measurement
87 # Set can interfaces up
88 sshgw 'for i in 0 1; do ip link show dev can$i|grep -q UP || ip link set can$i up type can bitrate 1000000; done'
89 # Delete all vcan interfaces
90 sshgw 'for dev in $(ip l|grep -o vcan[^:]\\+); do ip link del dev $dev; done'
92 sshgw 'chrt -p -f 50 `pidof irq/145-can0` > /dev/null'
93 sshgw 'chrt -p -f 50 `pidof irq/146-can1` > /dev/null'
94 sshgw 'chrt -p -f 49 `pidof sirq-net-rx/0` > /dev/null'
95 sshgw 'chrt -p -f 49 `pidof sirq-net-tx/0` > /dev/null'
101 if [[ ! "$OPT_PLOT_DISABLE" ]]; then
117 if [[ ! "$test_end_called" ]]; then
119 error "bug in the test script: No test_end called"
121 if ! test -n "$exit_ok"; then
122 error "FATAL: Command '$cmd' exited with code $code"