]> git.sur5r.net Git - bacula/bacula/blob - regress/rtest
Add remote regress test script
[bacula/bacula] / regress / rtest
1 #!/bin/sh
2
3 #  Run a regression test script on a remote machine
4 #
5 #  called: rtest <machine> <branch> <test-script>
6 #
7 #  Note: expects remote source to be in the same place
8 #  as defined in regress/config on your calling machine
9 #  Otherwise, you must define BACULA_SOURCE after the
10 #   . ./config
11
12 . ./config
13
14 if test $# != 3 ; then
15   echo "Called: rtest <machine> <branch> <test-script>"
16   exit 1
17 fi
18
19 host=$1
20 branch=$2
21 run=$3
22
23 ssh ${host} <<EOF
24   cd ${BACULA_SOURCE}
25   # remove any modified version.h
26   git checkout src/version.h
27   git checkout ${branch}
28   git pull
29   cd ../regress
30   ${run}
31 EOF
32 # Get test results
33 scp ${host}:${BACULA_SOURCE}/../regress/test.out rtest.out
34 cat rtest.out