mirror of
https://github.com/google/go-jsonnet.git
synced 2026-05-05 03:56:11 +02:00
Add C++-Jsonnet submodule for tests (#202)
* Add C++-Jsonnet submodule for tests * Add tests.sh to travis-ci
This commit is contained in:
parent
88519c3704
commit
cf6933d45b
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "cpp-jsonnet"]
|
||||
path = cpp-jsonnet
|
||||
url = https://github.com/google/jsonnet.git
|
||||
@ -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
|
||||
|
||||
12
README.md
12
README.md
@ -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
1
cpp-jsonnet
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit 6b7f64c136156ca67371be6089d2b89d5f0dab9e
|
||||
10
tests.sh
10
tests.sh
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user