]> Cypherpunks repositories - gostls13.git/commitdiff
src/run.bash: get rid of long windows expression
authorAlex Brainman <alex.brainman@gmail.com>
Wed, 9 Feb 2011 01:37:08 +0000 (12:37 +1100)
committerAlex Brainman <alex.brainman@gmail.com>
Wed, 9 Feb 2011 01:37:08 +0000 (12:37 +1100)
R=rsc
CC=golang-dev
https://golang.org/cl/4138041

src/env.bash
src/run.bash

index 2518c4233e139b039f89e27424334dde89092b61..4fc762821ec6d66a438b9a78f4c329ee824f4914 100644 (file)
@@ -38,7 +38,7 @@ fi
 
 # Tried to use . <($MAKE ...) here, but it cannot set environment
 # variables in the version of bash that ships with OS X.  Amazing.
-eval $($MAKE --no-print-directory -f Make.inc go-env | egrep 'GOARCH|GOOS|GO_ENV')
+eval $($MAKE --no-print-directory -f Make.inc go-env | egrep 'GOARCH|GOOS|GOHOSTARCH|GOHOSTOS|GO_ENV')
 
 # Shell doesn't tell us whether make succeeded,
 # so Make.inc generates a fake variable name.
index 731e07e495dde02864bfb7c3005b3d7b8a8af351..36508c6b51bd2556f4f994b64d158b8cafdd7129 100755 (executable)
@@ -77,19 +77,17 @@ time gomake test
 ) || exit $?
 
 [ "$GOARCH" == arm ] ||
+[ "$GOHOSTOS" == windows ] ||
 (xcd ../misc/cgo/stdio
-if [[ $(uname | tr A-Z a-z | sed 's/mingw/windows/') != *windows* ]]; then
-       gomake clean
-       ./test.bash
-fi
+gomake clean
+./test.bash
 ) || exit $?
 
 [ "$GOARCH" == arm ] ||
+[ "$GOHOSTOS" == windows ] ||
 (xcd ../misc/cgo/life
-if [[ $(uname | tr A-Z a-z | sed 's/mingw/windows/') != *windows* ]]; then
-       gomake clean
-       ./test.bash
-fi
+gomake clean
+./test.bash
 ) || exit $?
 
 (xcd pkg/exp/ogle
@@ -97,16 +95,14 @@ gomake clean
 time gomake ogle
 ) || exit $?
 
+[ "$GOHOSTOS" == windows ] ||
 (xcd ../doc/progs
-if [[ $(uname | tr A-Z a-z | sed 's/mingw/windows/') != *windows* ]]; then
-       time ./run
-fi
+time ./run
 ) || exit $?
 
+[ "$GOHOSTOS" == windows ] ||
 (xcd ../doc/codelab/wiki
-if [[ $(uname | tr A-Z a-z | sed 's/mingw/windows/') != *windows* ]]; then
-       gomake test
-fi
+gomake test
 ) || exit $?
 
 for i in ../misc/dashboard/builder ../misc/goplay
@@ -118,15 +114,13 @@ do
 done
 
 [ "$GOARCH" == arm ] ||
+[ "$GOHOSTOS" == windows ] ||
 (xcd ../test/bench
-if [[ $(uname | tr A-Z a-z | sed 's/mingw/windows/') != *windows* ]]; then
-       ./timing.sh -test
-fi
+./timing.sh -test
 ) || exit $?
 
+[ "$GOHOSTOS" == windows ] ||
 (xcd ../test
-if [[ $(uname | tr A-Z a-z | sed 's/mingw/windows/') != *windows* ]]; then
-       ./run
-fi
+./run
 ) || exit $?