summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-05-25 16:40:15 -0400
committerPietro Gagliardi <[email protected]>2014-05-25 16:40:15 -0400
commite2063cf94667b7317b90a54521e2f1345f2685d2 (patch)
tree86050a39aa7780d22cf16c5d49e512a6849cde2c
parent5a9a0eda6aae850b9d75ed513f6c51a1bb962b38 (diff)
Integrated windowsconstgen into the test build script. There's a small issue regarding amd64...
-rwxr-xr-xtest.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/test.sh b/test.sh
index d54c681..271f1fc 100755
--- a/test.sh
+++ b/test.sh
@@ -1,2 +1,16 @@
+if [ ! -f tools/windowsconstgen.go ]; then
+ echo error: $0 must be run from the package source root 1>&2
+ exit 1
+fi
+set -e
+if [ x$GOOS = xwindows ]; then
+ # have to build windowsconstgen as the host, otherwise weird things happen
+ wcg=`mktemp /tmp/windowsconstgenXXXXXXXXXXXX`
+ GOOS= GOARCH= go build -o $wcg tools/windowsconstgen.go
+ # but we can run it regardless of $GOOS/$GOARCH
+ $wcg . 386 "$@"
+ $wcg . amd64 "$@"
+ rm $wcg
+fi
cd test
go build "$@"