2013-04-08 19:17:59 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2015-03-03 23:12:00 +00:00
|
|
|
# Check servers up on http://www.polarhome.com/service/status/
|
|
|
|
|
2015-04-21 22:05:41 +00:00
|
|
|
P_ALL="vax freebsd solaris openbsd netbsd debian alpha aix redhat hpux ultrix minix qnx irix tru64 openindiana suse solaris-x86 mandriva ubuntu scosysv unixware dragonfly centos miros hurd raspbian macosx hpux-ia64 syllable pidora"
|
2013-07-19 17:13:00 +00:00
|
|
|
P_NOTWORKING="vax alpha openstep"
|
2014-01-22 01:54:18 +00:00
|
|
|
P_NOTWORKING_YET="ultrix irix"
|
2013-07-19 17:13:00 +00:00
|
|
|
|
2016-03-16 23:50:45 +00:00
|
|
|
P_WORKING="freebsd solaris openbsd netbsd debian aix redhat hpux qnx openindiana suse solaris-x86 mandriva ubuntu scosysv unixware centos miros raspbian macosx hpux-ia64 pidora debian-ppc"
|
2016-01-23 08:54:05 +00:00
|
|
|
P_TEMPORARILY_BROKEN="minix syllable tru64 hurd dragonfly"
|
2013-07-19 17:13:00 +00:00
|
|
|
|
|
|
|
P="$P_WORKING"
|
|
|
|
POLAR=`parallel -k echo {}.polarhome.com ::: $P`
|
2015-08-22 06:59:21 +00:00
|
|
|
S_POLAR=`parallel -k echo -S 1/{}.polarhome.com ::: $P`
|
2015-12-19 01:46:32 +00:00
|
|
|
|
|
|
|
# 20150414 --timeout 80 -> 40
|
|
|
|
# 20151219 --retries 5 -> 2
|
|
|
|
TIMEOUT=10
|
|
|
|
RETRIES=2
|
2013-04-08 19:17:59 +00:00
|
|
|
|
|
|
|
echo '### Tests on polarhome machines'
|
2013-04-11 19:55:33 +00:00
|
|
|
echo 'Setup on polarhome machines'
|
2015-12-19 01:46:32 +00:00
|
|
|
# Avoid the stupid /etc/issue.net banner at Polarhome: -oLogLevel=quiet
|
2013-07-19 17:13:00 +00:00
|
|
|
stdout parallel -kj0 ssh -oLogLevel=quiet {} mkdir -p bin ::: $POLAR &
|
2013-12-19 01:19:19 +00:00
|
|
|
|
2015-03-28 13:24:15 +00:00
|
|
|
test_empty_cmd() {
|
|
|
|
echo '### Test if empty command in process list causes problems'
|
|
|
|
perl -e '$0=" ";sleep 1' &
|
|
|
|
bin/perl bin/parallel echo ::: OK_with_empty_cmd
|
|
|
|
}
|
|
|
|
export -f test_empty_cmd
|
2015-12-19 01:46:32 +00:00
|
|
|
stdout parallel -j0 -k --retries $RETRIES --timeout $TIMEOUT --delay 0.1 --tag \
|
2015-03-28 13:24:15 +00:00
|
|
|
--nonall --env test_empty_cmd -S macosx.polarhome.com test_empty_cmd > /tmp/test_empty_cmd &
|
|
|
|
|
2013-12-19 01:19:19 +00:00
|
|
|
copy_and_test() {
|
2013-07-19 17:13:00 +00:00
|
|
|
H=$1
|
2013-12-19 01:19:19 +00:00
|
|
|
# scp to each polarhome machine do not work. Use cat
|
2013-07-19 17:13:00 +00:00
|
|
|
# Avoid the stupid /etc/issue.net banner with -oLogLevel=quiet
|
2013-12-19 01:19:19 +00:00
|
|
|
echo '### Run the test on '$H
|
2015-03-22 00:51:30 +00:00
|
|
|
cat `which parallel` |
|
|
|
|
stdout ssh -oLogLevel=quiet $H 'cat > bin/p.tmp && chmod 755 bin/p.tmp && mv bin/p.tmp bin/parallel && bin/perl bin/parallel echo Works on {} ::: '$H'; bin/perl bin/parallel --tmpdir / echo ::: test read-only tmp' |
|
2015-04-04 14:37:32 +00:00
|
|
|
perl -pe 's:/[a-z0-9_]+.arg:/XXXXXXXX.arg:gi; s/\d\d\d\d/0000/gi;'
|
2013-07-19 17:13:00 +00:00
|
|
|
}
|
2013-12-19 01:19:19 +00:00
|
|
|
export -f copy_and_test
|
2015-12-19 01:46:32 +00:00
|
|
|
stdout parallel -j0 -k --retries $RETRIES --timeout $TIMEOUT --delay 0.1 --tag -v copy_and_test {} ::: $POLAR
|
2013-04-08 19:17:59 +00:00
|
|
|
|
2015-08-22 06:59:21 +00:00
|
|
|
# Test remote wrapper working on all platforms
|
2016-02-21 22:07:44 +00:00
|
|
|
parallel -j0 --nonall -k --timeout $TIMEOUT $S_POLAR hostname
|
2015-08-22 06:59:21 +00:00
|
|
|
|
2015-03-28 13:24:15 +00:00
|
|
|
cat /tmp/test_empty_cmd
|
|
|
|
rm /tmp/test_empty_cmd
|