]> git.sur5r.net Git - bacula/bacula/blob - regress/rtest
Make out of freespace non-fatal for removable devices -- i.e. behaves like tape
[bacula/bacula] / regress / rtest
1 #!/bin/sh
2 #
3 # Copyright (C) 2000-2015 Kern Sibbald
4 # License: BSD 2-Clause; see file LICENSE-FOSS
5 #
6
7
8 #  Run a regression test script on a remote machine
9 #
10 #  called: rtest <machine> <branch> <test-script>
11 #
12 #  Since make setup is always called, you probably want
13 #  to execute scripts that do not do the setup. If you do
14 #  it just takes a bit longer, but there is no harm done.
15 #
16 #  Note: expects remote source to be in the same place
17 #  as defined in regress/config on your calling machine
18 #  Otherwise, you must define BACULA_SOURCE after the
19 #   . ./config
20
21 . ./config
22
23 if test $# != 3 ; then
24   echo "Called: rtest <machine> <branch> <test-script>"
25   exit 1
26 fi
27
28 host=$1
29 branch=$2
30 run=$3
31
32 ssh ${host} <<EOF
33   cd ${BACULA_SOURCE}
34   # remove any modified version.h
35   git checkout src/version.h
36   git checkout ${branch}
37   git pull
38   cd ../regress
39   make setup
40   ${run}
41 EOF
42 # Get test results
43 scp ${host}:${BACULA_SOURCE}/../regress/test.out rtest.out
44 cat rtest.out
45 echo " "
46 echo " "
47 grep -e" \!\!\!\!" -e"===\ Test" test.out