]> git.sur5r.net Git - bacula/bacula/commitdiff
Add remote regress test script
authorKern Sibbald <kern@sibbald.com>
Sun, 21 Oct 2012 08:35:03 +0000 (10:35 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:51:02 +0000 (14:51 +0200)
regress/rtest [new file with mode: 0755]

diff --git a/regress/rtest b/regress/rtest
new file mode 100755 (executable)
index 0000000..b613b2f
--- /dev/null
@@ -0,0 +1,34 @@
+#!/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