File: loop.sh

package info (click to toggle)
gfarm 2.3.2-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 10,972 kB
  • ctags: 10,894
  • sloc: ansic: 84,510; sh: 13,707; java: 6,866; makefile: 2,286; python: 771; perl: 325; sql: 130; xml: 50; asm: 37; csh: 2
file content (28 lines) | stat: -rwxr-xr-x 430 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh

. ./regress.conf

loop=1
fail=0

while :; do
	echo "############## loop = $loop (fail = $fail) #################"

	./regress.sh
	exit_code=$?

	case $exit_code in
	$exit_pass)
		:;;
	$exit_fail)
		echo "FAILURE @ loop $loop"
		mv log log.$loop
		fail=`expr $fail + 1`;;
	$exit_trap)
		exit $exit_code;;
	*)
		echo "`basename $0`: unknown exit code $exit_code" >&2
		exit $exit_code;;
	esac
	loop=`expr $loop + 1`
done