parallel: --(n)onall and --sshdelay fixed.
[parallel.git] / testsuite / Makefile
blob840fe9057e2f74a073abda1456e6797867b580f8
1 ### Full test set (except mem)
2 testsuite: 3
3 true
5 3: ../src/parallel tests-to-run/* wanted-results/* startdb prereqlocal prereqremote
6 TRIES=3 time bash Start.sh '' mem || true
7 touch ~/.parallel/will-cite
8 make stopvm
10 ### Limited testsets - run once
11 # No 100s, 300s, mem, polarhome, tutorial
12 1: ../src/parallel tests-to-run/* wanted-results/* prereqlocal startdb prereqremote
13 TRIES=1 time bash Start.sh '' '00s|mem|polarhome|tutorial' || true
14 touch ~/.parallel/will-cite
15 make stopvm
17 # Mem
18 mem: ../src/parallel tests-to-run/*mem* wanted-results/*mem*
19 make stopvm || true
20 time bash Start.sh mem NONE || true
21 touch ~/.parallel/will-cite
22 make stopvm
24 # Tutorial
25 tutorial: ../src/parallel tests-to-run/*tutorial* wanted-results/*tutorial* prereqlocal
26 TRIES=1 time bash Start.sh tutorial NONE || true
27 touch ~/.parallel/will-cite
28 make stopvm
30 # 100s and 300s
31 100s: ../src/parallel tests-to-run/*00s* wanted-results/*00s* prereqlocal
32 time bash Start.sh 00s NONE || true
33 touch ~/.parallel/will-cite
34 make stopvm
36 # Polarhome
37 polarhome: polar
38 true
40 polar: ../src/parallel tests-to-run/*polar* wanted-results/*polar* prereqlocal
41 time bash Start.sh polar NONE || true
42 touch ~/.parallel/will-cite
44 # *local* only
45 local: testlocal
46 true
48 testlocal: ../src/parallel tests-to-run/*local* wanted-results/*local* prereqlocal installparallel
49 time bash Start.sh local mem
51 # short and local
52 short: testlocalshort
53 true
55 testlocalshort: ../src/parallel tests-to-run/*local* wanted-results/*local* prereqlocal installparallel
56 TRIES=1 time bash Start.sh local 'mem|100s|300s'
58 # sql
59 testdb: ../src/parallel tests-to-run/*sql* wanted-results/*sql* prereqdb
60 time bash Start.sh sql NONE
62 # Portable tests that runs everywhere
63 portable:
64 # Cache sudo password
65 sudo echo
66 time bash Portable.sh
68 ### Prerequisites
69 REQUIRE=bash -c '\
70 is_installed() { \
71 eval $$2 >/dev/null 2>/dev/null || (echo "$$1" is required for testsuite; /bin/false); \
72 }; \
73 export -f is_installed; \
74 parallel -n2 --tag is_installed ::: \
75 script "echo | script -c echo -q /dev/null" \
76 lsh "lsh lo echo lsh is installed" \
77 "ssh sh@lo" "timeout 20 ssh sh@lo true" \
78 "ssh csh@lo" "timeout 5 ssh csh@lo true" \
79 niceload "niceload echo niceload is installed" \
80 expect "expect -c \"spawn cat; puts \\\"expect is installed\\\"\"" \
81 autossh "autossh -V" \
82 tcsh "tcsh -c echo tcsh installed" \
83 seq "seq 1 2" \
84 stdout "stdout echo stdout is installed" \
85 convert "convert -version" \
86 bc "echo 1+2 | bc" \
87 gawk "echo | gawk \"{print \\\"gawk is installed\\\"}\"" \
88 pv "echo | pv -qL 10" \
89 timeout "timeout 1 echo timeout is installed" \
92 prereqlocal: installparallel startvm
93 ${REQUIRE}
94 parallel -j1 ssh-keygen -R parallel-server{} ::: 1 2 3 4 || true
95 (parallel 'ssh vagrant@parallel-server{} mkdir -p bin; scp `which parallel` vagrant@parallel-server{}:bin/' ::: 1 2 3 4)&
97 prereqremote: installparallel startvm
98 parallel -j0 --timeout 10 --tag ssh vagrant@parallel-server{} parallel --minversion 20121021 ::: 1 2 || (echo parallel on remote required for testsuite; /bin/true)
100 startvm:
101 parallel --tag -k 'ping -w 1 -c 1 {} || (cd vagrant/*/{} && vagrant up)' ::: centos8 freebsd11 freebsd12 rhel8 centos3 &
103 stopvm:
104 parallel --tag -k 'ping -w 1 -c 1 {} && cd vagrant/*/{} && vagrant suspend' ::: centos8 freebsd11 freebsd12 rhel8 centos3
106 startdb:
107 true should start Oracle in vagrant
108 startdb-old:
109 #echo shutdown abort | sudo su - oracle -c "sqlplus / as sysdba"
110 sudo parallel /etc/init.d/{} status '||' /etc/init.d/{} restart ::: postgresql mysql # oracle-xe
111 VBoxManage startvm OracleXE || true
112 parallel 'ping {} | read' ::: oracle11.tange.dk
114 ### Distribution
115 installparallel: ../src/parallel
116 cd .. && make -j && sudo make -j install
118 clean:
119 rm -rf input-files/random_dirs_no_newline
120 rm -rf input-files/random_dirs_with_newline
122 dist:
123 rm -rf input-files/random_dirs_*_newline || /bin/true
124 rm -rf tmp || /bin/true
125 ( cd ..; tar -cvj --exclude .git --exclude '#*#' --exclude '*~' --exclude CVS -f /tmp/parallel.tar.bz2 parallel-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] )
126 mv /tmp/parallel.tar.bz2 parallel-$$(date +"%Y%m%d").tar.bz2
127 rsync -Havessh parallel-$$(date +"%Y%m%d").tar.bz2 download.savannah.nongnu.org:/releases/parallel/
129 ### Measure timings
130 timings: tests-to-run/* ../src/parallel
131 ls tests-to-run/*.sh | parallel echo /usr/bin/time -f "'%e\ %P'" bash >/tmp/timing.script
132 stdout bash -x /tmp/timing.script | tee /tmp/timing.out
133 echo + .usr.bin.time_END >>/tmp/timing.out
134 perl -ne '/\+ .usr.bin.time/ and do { print $$last.$$h; $$h=$$_ }; chomp; s/.*\0//;$$last = $$_' /tmp/timing.out |sort -n >timings
136 timingbar:
137 vmstat 1 | timestamp --isotime > vmstat.timestamp.1 &
138 stdout make 1 | timestamp --isotime | tee make.timestamp.1
139 killall vmstat
140 mv vmstat.timestamp.1 vmstat.timestamp
141 mv make.timestamp.1 make.timestamp
142 sort vmstat.timestamp make.timestamp | perl -pe '/tests-to-run(\S+)/ and $$p=$$1; print "$$p "' | field 6,1,2 | perl -ne '/^\d+ / and print' | histogram -i vh