3 # $DragonFly: src/usr.bin/make/tests/Attic/env.sh,v 1.4 2005/02/25 11:57:32 okumoto Exp $
8 # We can't check a file into cvs without a DragonFly RCS Id tag, so
9 # we need to remove it before we compare.
17 1> /dev/null 2> /dev/null
25 # We can't check a file into cvs without a DragonFly RCS Id tag, so
26 # we need to remove it before we compare.
43 hack_cmp expected.stdout stdout || FAIL="stdout "$FAIL
44 hack_cmp expected.stderr stderr || FAIL="stderr "$FAIL
45 hack_cmp expected.status status || FAIL="status "$FAIL
47 if [ -z "$FAIL" ]; then
50 echo "Test failed ( $FAIL) `pwd`"
57 echo "------------------------"
59 echo "------------------------"
60 hack_diff expected.stdout stdout
61 hack_diff expected.stderr stderr
62 hack_diff expected.status status
68 [ -f expected.stdout ] || echo '$'DragonFly'$' > expected.stdout
69 [ -f expected.stderr ] || echo '$'DragonFly'$' > expected.stderr
70 [ -f expected.status ] || echo '$'DragonFly'$' > expected.status
71 sed -e '2,$d' < expected.stdout > new.expected.stdout
72 sed -e '2,$d' < expected.stderr > new.expected.stderr
73 sed -e '2,$d' < expected.status > new.expected.status
74 cat stdout >> new.expected.stdout
75 cat stderr >> new.expected.stderr
76 cat status >> new.expected.status
77 mv new.expected.stdout expected.stdout
78 mv new.expected.stderr expected.stderr
79 mv new.expected.status expected.status
105 echo "Test directory '$1' missing in directory '$START_BASE'"
109 if [ ! -f $1/test.sh ]; then
110 echo "Test script missing in directory '$START_BASE/$1'"
114 START_BASE=${START_BASE}/$1
115 (cd $1; sh test.sh $2)
119 # Note: Uses global variable $DIR which might be assigned by
120 # the script which sourced this file.
124 if [ "${DIR}" ]; then
126 test|compare|diff|update|clean|run)
128 eval_subdir_cmd $d $1
132 echo "Usage: $0 run | compare | update | clean"
156 echo "Usage: $0 run | compare | update | clean"
163 # Parse command line arguments.
189 START_BASE=${START_BASE:-.}