mirror of
https://github.com/golang/go
synced 2024-11-25 10:07:56 -07:00
316bc2637d
test/func.go now works; update golden.out SVN=121617
50 lines
809 B
Bash
Executable File
50 lines
809 B
Bash
Executable File
#!/bin/sh
|
|
# Copyright 2009 The Go Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style
|
|
# license that can be found in the LICENSE file.
|
|
|
|
case X"$GOARCH" in
|
|
Xamd64)
|
|
export A=6
|
|
;;
|
|
*)
|
|
export A=6
|
|
echo 1>&2 run: assuming amd64
|
|
exit 1
|
|
esac
|
|
|
|
export G=${A}g
|
|
export L=${A}l
|
|
|
|
failed=0
|
|
|
|
for dir in . ken bugs fixedbugs
|
|
do
|
|
for i in $dir/*.go
|
|
do
|
|
echo
|
|
echo '===========' $i
|
|
export F=$(basename $i .go)
|
|
export D=$dir
|
|
sed -n '1,/[^/]/p' $i | sed 's@//@@; $d' > /tmp/$USER.$$.gotest
|
|
if ! sh /tmp/$USER.$$.gotest
|
|
then
|
|
echo >&2 fail: $i
|
|
fi
|
|
done
|
|
done | cat -v >run.out
|
|
|
|
case $failed in
|
|
1)
|
|
echo FAIL
|
|
esac
|
|
rm -f /tmp/$USER.$$.gotest *.6 6.out
|
|
if ! diff run.out golden.out
|
|
then
|
|
failed=1
|
|
fi
|
|
|
|
echo 2>&1 $(grep -c '^BUG' run.out) tests are behaving incorrectly
|
|
|
|
exit $failed
|