-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildScript.bash
executable file
·76 lines (60 loc) · 2.33 KB
/
buildScript.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#!/bin/bash
# buildScript.sh
# abst-hier
#
# Created by Ken Friedenbach on 7/17/12.
# Copyright 2012-2014. All rights reserved.
date
cd ../../../../
pwd
export GOOS=darwin
export GOARCH=amd64
export GOROOT=/usr/local/go
export GOBIN=$GOROOT/bin
export GOPATH=/usr/local/go:/Users/ken/Projects/abst-hier
export PATH=$PATH:/Users/ken/Projects/abst-hier/bin
echo "cleaning"
go clean github.com/Ken1JF/ah
go clean github.com/Ken1JF/sgf
go clean github.com/Ken1JF/sgfdb
echo "looking for bin/test_ahgo to remove"
if [[ -e bin/test_ahgo ]] ; then echo "remove bin/test_ahgo" ; rm bin/test_ahgo ; fi
echo "veting"
go tool vet src/github.com/Ken1JF/ah
go tool vet src/github.com/Ken1JF/sgf
go tool vet src/github.com/Ken1JF/sgfdb
go tool vet src/github.com/Ken1JF/test-ahgo/test_ahgo.go
echo "installing"
go install github.com/Ken1JF/ah
go install github.com/Ken1JF/sgf
go install github.com/Ken1JF/sgfdb
echo "testing"
go test github.com/Ken1JF/ah
go test github.com/Ken1JF/sgf
go test github.com/Ken1JF/sgfdb
#echo "NOT running coverage during development"
# Do coverage after development is complete
echo "testing individual package test coverage"
go test -cover github.com/Ken1JF/ah
go test -cover github.com/Ken1JF/sgf
go test -cover github.com/Ken1JF/sgfdb
echo "testing combined coverage together"
if [[ -e test/ ]] ; then echo "test/ exists" ; else echo "making test/" ; mkdir test ; fi
go test -cover github.com/Ken1JF/ah -coverprofile test/ahCover.out
go test -cover github.com/Ken1JF/sgf -coverpkg github.com/Ken1JF/ah,github.com/Ken1JF/sgf -coverprofile test/sgfCover.out
go test -cover github.com/Ken1JF/sgfdb -coverpkg github.com/Ken1JF/ah,github.com/Ken1JF/sgf,github.com/Ken1JF/sgfdb -coverprofile test/sgfdbCover.out
#-coverprofile cover.out
#echo "NOT formatting"
# Only do this when everything is clean!
# and XCode has been shut down.
echo "formatting"
go fmt github.com/Ken1JF/ah
go fmt github.com/Ken1JF/sgf
go fmt github.com/Ken1JF/sgfdb
go fmt github.com/Ken1JF/test-ahgo
echo "building test_ahgo"
go build -o bin/test_ahgo src/github.com/Ken1JF/test-ahgo/test_ahgo.go
echo "running test_ahgo"
test_ahgo -al=true -offn="src/github.com/Ken1JF/test-ahgo/Fuseki3.sgf" -ffn="src/github.com/Ken1JF/test-ahgo/Fuseki2.sgf" -rwf=true >& test_ahgo_new.txt -ssf="src/github.com/Ken1JF/sgf/sgf_properties_spec.txt"
diff test_ahgo_new.txt test_ahgo_out.txt
date