3 # Redirect for non-GNU time systems
4 if [ "xx$TIME_CMD" = "xx" ]
13 while [ ! -f $dir/wiggle
]
15 if [ -z "$dir" ]; then
16 echo >&2 Cannot
find wiggle program
: $WIGGLE
21 export WIGGLE
=$dir/wiggle
27 TIME
="$time_cmd -o .time -f %U"
28 if $TIME true
> /dev
/null
2>&1
32 vallog
=/tmp
/valg.log-$$
34 if [ " $1" = " valgrind" ]; then
35 TIME
="valgrind --log-file=$vallog"
41 find .
-name core |
xargs rm -f
42 list
=$
(find .
-type f \
( -name script -o -name diff -o -name ldiff \
43 -o -name rediff
-o -name merge
-o -name wmerge
-o -name lmerge \
44 -o -name replace
-o -name Wmerge
-o -name bmerge \
)
56 then $TIME $WIGGLE -dw orig new |
diff -u diff - ; xit
=$?
57 else $TIME $WIGGLE -dwp1 orig
patch |
diff -u diff - ; xit
=$?
61 then $TIME $WIGGLE -dl orig new |
diff -u ldiff
- ; xit
=$?
62 else $TIME $WIGGLE -dlp1 orig
patch |
diff -u ldiff
- ; xit
=$?
65 reldiff
) $TIME $WIGGLE -dl patch |
diff -u reldiff
- ; xit
=$?
67 rediff
) $TIME $WIGGLE -dw patch |
diff -u rediff
- ; xit
=$?
69 merge
) if [ -f patch ]
70 then $TIME $WIGGLE -m orig
patch |
diff -u merge
- ; xit
=$?
72 then $TIME $WIGGLE -m orig new new2 |
diff -u merge
- ; xit
=$?
73 else $TIME $WIGGLE -m orig |
diff -u merge
- ; xit
=$?
76 replace
) cp orig orig.tmp
78 then $TIME $WIGGLE -mr orig.tmp
patch
79 else $TIME $WIGGLE -mr orig.tmp new new2
81 diff -u merge orig.tmp
; xit
=$?
82 rm orig.tmp orig.tmp.porig
84 lmerge
) if [ -f patch ]
85 then $TIME $WIGGLE -ml orig
patch |
diff -u lmerge
- ; xit
=$?
86 else $TIME $WIGGLE -ml orig new new2 |
diff -u lmerge
- ; xit
=$?
89 wmerge
) if [ -f patch ]
90 then $TIME $WIGGLE -mw orig
patch |
diff -u wmerge
- ; xit
=$?
91 else $TIME $WIGGLE -mw orig new new2 |
diff -u wmerge
- ; xit
=$?
94 Wmerge
) if [ -f patch ]
95 then $TIME $WIGGLE -mW orig
patch |
diff -u Wmerge
- ; xit
=$?
96 else $TIME $WIGGLE -mW orig new new2 |
diff -u Wmerge
- ; xit
=$?
99 bmerge
) if [ -f patch ]
100 then $TIME $WIGGLE -mbw orig
patch |
diff -u bmerge
- ; xit
=$?
101 else $TIME $WIGGLE -mbw orig new new2 |
diff -u bmerge
- ; xit
=$?
105 if [ $xit = 0 ]; then msg
=SUCCEEDED
; else msg
=FAILED
; fi
106 if grep 'ERROR SUMMARY: [1-9]' $vallog > /dev
/null
2>&1
107 then msg
="$msg WITH VALGRIND ERRORS"; xit
=1
109 echo $path $msg `grep -v 'Command exited' .time 2> /dev/null`
115 else status
=1 ; let fail
++
118 find .
-name core
-ls
119 echo $ok succeeded and
$fail failed