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 "$@"
33 # Set can interfaces up
34 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'
39 local testname=`basename $0 .sh`
41 plot_cmds | sed -e "/set title/ s/[\"']\(.*\)[\"']/\"\1\\\\n($kvers)\"/" > plot.gp
42 if [ -z "$OPT_NO_X11" ]; then
43 echo "set terminal x11 enhanced; $(< plot.gp)" | gnuplot -persist
46 echo 'set terminal postscript color eps enhanced size 6cm,4cm lw 1 "Times-Roman" 10;' \
48 "$(< plot.gp)" | gnuplot > ${testname}$I.eps
49 echo "set terminal postscript color eps enhanced;" \
50 "$(< plot.gp)" | gnuplot | epstopdf --filter > ${testname}$I.pdf
52 convert -density 30 -gamma 0.5 -quality 90 -type Palette -depth 8 ${testname}$I.pdf thumb/${testname}$I.png
53 convert -density 150 -gamma 0.7 -quality 90 -type Palette -depth 8 ${testname}$I.pdf ${testname}$I.png
57 create_dirs_and_links() {
61 local d=results/by-kern/$kver/$test
63 mkdir -p results/by-test/$test
64 ln -sfT ../../${d#results/} results/by-test/$test/$kver
69 if [[ ! "$OPT_PLOT_ONLY" ]]; then
70 kernel_versions=$(sshgw uname -r)
72 kernel_versions=$(ls results/by-kern)
74 for kvers in $kernel_versions; do
75 dir=$(create_dirs_and_links $(basename $0 .sh) $kvers)
78 echo "Working directory: $dir"
79 if [[ ! "$OPT_PLOT_ONLY" ]]; then
99 if [[ ! "$test_end_called" ]]; then
101 error "bug in the test script: No test_end called"
103 if ! test -n "$exit_ok"; then
104 error "FATAL: Command '$cmd' exited with code $code"