Skip to content

Commit cf6933d

Browse files
marcelocantossparkprime
authored andcommitted
Add C++-Jsonnet submodule for tests (#202)
* Add C++-Jsonnet submodule for tests * Add tests.sh to travis-ci
1 parent 88519c3 commit cf6933d

File tree

5 files changed

+22
-7
lines changed

5 files changed

+22
-7
lines changed

.gitmodules

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

.travis.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ before_install:
99
- go get github.com/mattn/goveralls
1010
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
1111
script:
12-
- $HOME/gopath/bin/goveralls -service=travis-ci
12+
- $HOME/gopath/bin/goveralls -service=travis-ci
13+
- ./tests.sh --skip-go-test

README.md

+9-3
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ This code is known to work on Go 1.8 and above. We recommend always using the ne
1818

1919
## Build instructions
2020

21-
```
21+
```bash
2222
export GOPATH=$HOME/go-workspace
2323
mkdir -pv $GOPATH
2424
go get github.com/google/go-jsonnet
@@ -32,13 +32,19 @@ go build
3232
}
3333
```
3434

35+
## Running tests
36+
37+
```bash
38+
./tests.sh # Also runs `go test ./...`
39+
```
40+
3541
## Implementation Notes
3642

3743
We are generating some helper classes on types by using
3844
http://clipperhouse.github.io/gen/. Do the following to regenerate these if
3945
necessary:
4046

41-
```
47+
```bash
4248
go get github.com/clipperhouse/gen
4349
go get github.com/clipperhouse/set
4450
export PATH=$PATH:$GOPATH/bin # If you haven't already
@@ -49,6 +55,6 @@ go generate
4955

5056
To regenerate the standard library, do:
5157

52-
```
58+
```bash
5359
./reset_stdast_go.sh && go run cmd/dumpstdlibast.go
5460
```

cpp-jsonnet

Submodule cpp-jsonnet added at 6b7f64c

tests.sh

+7-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@
22

33
set -e
44

5+
[ "$1" = "--skip-go-test" ] || go test ./...
6+
57
export IMPLEMENTATION=go
68

79
(cd jsonnet; go build)
8-
source tests_path.source
10+
911
export DISABLE_LIB_TESTS=true
1012
export DISABLE_FMT_TESTS=true
1113
export DISABLE_ERROR_TESTS=true
1214
export JSONNET_BIN="$PWD/jsonnet/jsonnet"
13-
cd "$TESTS_PATH"
14-
./tests.sh
15+
16+
git submodule update --recursive cpp-jsonnet
17+
cd cpp-jsonnet
18+
exec ./tests.sh

0 commit comments

Comments
 (0)