Move crontab complexity into new wrapper script
authorSteve McIntyre <steve@einval.com>
Thu, 19 May 2016 23:25:15 +0000 (00:25 +0100)
committerSteve McIntyre <steve@einval.com>
Thu, 19 May 2016 23:25:15 +0000 (00:25 +0100)
crontab
wrapper [new file with mode: 0644]

diff --git a/crontab b/crontab
index 695ca0e..3c6b234 100644 (file)
--- a/crontab
+++ b/crontab
@@ -22,4 +22,4 @@
 # m h  dom mon dow   command
 MAILTO=""
 #MAILTO=93sam@debian.org
-01 02 * * * if [ ! -d strace-test ] ; then git -c http.sslcainfo=/etc/ssl/ca-global/ca-certificates.crt clone https://git.einval.com/git/strace-test.git; fi; cd strace-test; git -c http.sslcainfo=/etc/ssl/ca-global/ca-certificates.crt pull; crontab crontab; ./strace-build-test
+01 02 * * * if [ ! -d strace-test ] ; then git -c http.sslcainfo=/etc/ssl/ca-global/ca-certificates.crt clone https://git.einval.com/git/strace-test.git; fi; ./strace-test/wrapper
diff --git a/wrapper b/wrapper
new file mode 100644 (file)
index 0000000..9899707
--- /dev/null
+++ b/wrapper
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+cd strace-test
+
+# Set up git variables cleanly, and pull
+git config --unset http.sslcainfo
+git config --add http.sslcainfo /etc/ssl/ca-global/ca-certificates.crt
+git pull -q
+
+# Make sure the crontab is updated
+crontab crontab
+
+# Now start tests appropriately
+HOSTNAME=$(hostname)
+
+case $HOSTNAME in
+    abel)
+        ./strace-build-test -a armel > /dev/null 2>&1
+        ./strace-build-test -a armhf > /dev/null 2>&1
+       ;;
+    barriere)
+        ./strace-build-test -a amd64 > /dev/null 2>&1
+        ./strace-build-test -a i386 > /dev/null 2>&1
+       ;;
+    etler)
+        ./strace-build-test -a mipsel > /dev/null 2>&1
+        ./strace-build-test -a mips64el > /dev/null 2>&1
+       ;;
+    *) # asachi minkus partch plummer zelenka - all have one arch as
+       # default
+        ./strace-build-test > /dev/null 2>&1
+       ;;
+esac