--- /dev/null
+#!/bin/sh
+#
+# Run a regression test script on a remote machine
+#
+# called: rtest <machine> <branch> <test-script>
+#
+# Note: expects remote source to be in the same place
+# as defined in regress/config on your calling machine
+# Otherwise, you must define BACULA_SOURCE after the
+# . ./config
+
+. ./config
+
+if test $# != 3 ; then
+ echo "Called: rtest <machine> <branch> <test-script>"
+ exit 1
+fi
+
+host=$1
+branch=$2
+run=$3
+
+ssh ${host} <<EOF
+ cd ${BACULA_SOURCE}
+ # remove any modified version.h
+ git checkout src/version.h
+ git checkout ${branch}
+ git pull
+ cd ../regress
+ ${run}
+EOF
+# Get test results
+scp ${host}:${BACULA_SOURCE}/../regress/test.out rtest.out
+cat rtest.out