|
4 | 4 |
|
5 | 5 | go version
|
6 | 6 |
|
| 7 | +packages=$(go list ./... | grep github.com/dgraph-io/badger/v2/) |
| 8 | + |
| 9 | +if [[ ! -z "$TEAMCITY_VERSION" ]]; then |
| 10 | + export GOFLAGS="-json" |
| 11 | +fi |
| 12 | + |
7 | 13 | # Ensure that we can compile the binary.
|
8 | 14 | pushd badger
|
9 | 15 | go build -v .
|
10 | 16 | popd
|
11 | 17 |
|
12 | 18 | # Run the memory intensive tests first.
|
13 |
| -go test -v --manual=true -run='TestBigKeyValuePairs$' |
14 |
| -go test -v --manual=true -run='TestPushValueLogLimit' |
| 19 | +go test -v -run='TestBigKeyValuePairs$' --manual=true |
| 20 | +go test -v -run='TestPushValueLogLimit' --manual=true |
15 | 21 |
|
16 | 22 | # Run the special Truncate test.
|
17 | 23 | rm -rf p
|
18 |
| -go test -v --manual=true -run='TestTruncateVlogNoClose$' . |
| 24 | +go test -v -run='TestTruncateVlogNoClose$' --manual=true |
19 | 25 | truncate --size=4096 p/000000.vlog
|
20 |
| -go test -v --manual=true -run='TestTruncateVlogNoClose2$' . |
21 |
| -go test -v --manual=true -run='TestTruncateVlogNoClose3$' . |
| 26 | +go test -v -run='TestTruncateVlogNoClose2$' --manual=true |
| 27 | +go test -v -run='TestTruncateVlogNoClose3$' --manual=true |
22 | 28 | rm -rf p
|
23 | 29 |
|
24 | 30 | # Then the normal tests.
|
| 31 | +echo |
| 32 | +echo "==> Starting test for table, skl and y package" |
| 33 | +go test -v -race github.com/dgraph-io/badger/v2/skl |
| 34 | +# Run test for all package except the top level package. The top level package support the |
| 35 | +# `vlog_mmap` flag which rest of the packages don't support. |
| 36 | +go test -v -race $packages |
| 37 | + |
25 | 38 | echo
|
26 | 39 | echo "==> Starting tests with value log mmapped..."
|
27 |
| -sleep 5 |
28 |
| -go test -v --vlog_mmap=true -race ./... |
| 40 | +# Run top level package tests with mmap flag. |
| 41 | +go test -v -race github.com/dgraph-io/badger/v2 --vlog_mmap=true |
29 | 42 |
|
30 | 43 | echo
|
31 | 44 | echo "==> Starting tests with value log not mmapped..."
|
32 |
| -sleep 5 |
33 |
| -go test -v --vlog_mmap=false -race ./... |
| 45 | +go test -v -race github.com/dgraph-io/badger/v2 --vlog_mmap=false |
| 46 | + |
0 commit comments