Add C++-Jsonnet submodule for tests (#202)

* Add C++-Jsonnet submodule for tests
* Add tests.sh to travis-ci
This commit is contained in:
Marcelo Cantos 2018-03-07 05:05:00 +11:00 committed by Dave Cunningham
parent 88519c3704
commit cf6933d45b
5 changed files with 22 additions and 7 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "cpp-jsonnet"]
path = cpp-jsonnet
url = https://github.com/google/jsonnet.git

View File

@ -9,4 +9,5 @@ before_install:
- go get github.com/mattn/goveralls
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
script:
- $HOME/gopath/bin/goveralls -service=travis-ci
- $HOME/gopath/bin/goveralls -service=travis-ci
- ./tests.sh --skip-go-test

View File

@ -18,7 +18,7 @@ This code is known to work on Go 1.8 and above. We recommend always using the ne
## Build instructions
```
```bash
export GOPATH=$HOME/go-workspace
mkdir -pv $GOPATH
go get github.com/google/go-jsonnet
@ -32,13 +32,19 @@ go build
}
```
## Running tests
```bash
./tests.sh # Also runs `go test ./...`
```
## Implementation Notes
We are generating some helper classes on types by using
http://clipperhouse.github.io/gen/. Do the following to regenerate these if
necessary:
```
```bash
go get github.com/clipperhouse/gen
go get github.com/clipperhouse/set
export PATH=$PATH:$GOPATH/bin # If you haven't already
@ -49,6 +55,6 @@ go generate
To regenerate the standard library, do:
```
```bash
./reset_stdast_go.sh && go run cmd/dumpstdlibast.go
```

1
cpp-jsonnet Submodule

@ -0,0 +1 @@
Subproject commit 6b7f64c136156ca67371be6089d2b89d5f0dab9e

View File

@ -2,13 +2,17 @@
set -e
[ "$1" = "--skip-go-test" ] || go test ./...
export IMPLEMENTATION=go
(cd jsonnet; go build)
source tests_path.source
export DISABLE_LIB_TESTS=true
export DISABLE_FMT_TESTS=true
export DISABLE_ERROR_TESTS=true
export JSONNET_BIN="$PWD/jsonnet/jsonnet"
cd "$TESTS_PATH"
./tests.sh
git submodule update --recursive cpp-jsonnet
cd cpp-jsonnet
exec ./tests.sh