also add a cleanup phase to cmd/go/test.bash.
R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/
6741050
var set = make(map[string]bool)
for _, arg := range args {
- set[arg] = true
- }
- for arg := range set {
- pkgs = append(pkgs, loadPackage(arg, &stk))
+ if !set[arg] {
+ pkgs = append(pkgs, loadPackage(arg, &stk))
+ set[arg] = true
+ }
}
-
computeStale(pkgs...)
return pkgs
ok=false
fi
+# ensure that output of 'go list' is consistent between runs
+./testgo list std > test_std.list
+if ! ./testgo list std | cmp -s test_std.list - ; then
+ echo "go list std ordering is inconsistent"
+ ok=false
+fi
+rm -f test_std.list
+
+# clean up
+rm -rf testdata/bin testdata/bin1
+rm -f testgo
+
if $ok; then
echo PASS
else