Skip to content

Commit 73b06a3

Browse files
CodyDWJonesCody Jones
and
Cody Jones
authored
Make it easier for new contributors to regenerate the test suite (#495)
"make generate" will now regenerate the ReQL test code. If the path to the Rethink working directory isn't set, it will now give the developer more explanation what to do. Co-authored-by: Cody Jones <[email protected]>
1 parent 8903c47 commit 73b06a3

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# Folders
1111
_obj
1212
_test
13+
__pycache__
1314

1415
# Architecture specific extensions/prefixes
1516
*.[568vq]

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@ integration:
88

99
benchpool:
1010
go test -v -cpu 1,2,4,8,16,24,32,64,128,256 -bench=BenchmarkConnectionPool -run ^$ ./internal/integration/tests/
11+
12+
generate:
13+
go generate ./internal/...
14+

internal/gen_tests/gen_tests.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
set -e
44

5-
if [[ $REQL_TEST_DIR == "" ]]
5+
if [[ ! -d $REQL_TEST_DIR ]]
66
then
7-
echo "\$REQL_TEST_DIR must be specified"
7+
echo "REQL_TEST_DIR must be set to the local copy of the https://github.com/rethinkdb/rethinkdb/tree/next/test/rql_test/src/ directory."
88
exit 1
99
fi
1010

11-
../gen_tests/gen_tests.py --test-dir=$REQL_TEST_DIR
11+
SCRIPT_DIR=$(dirname "$0")
12+
13+
$SCRIPT_DIR/gen_tests.py --test-dir=$REQL_TEST_DIR
1214

1315
goimports -w . > /dev/null
1416

internal/integration/reql_tests/gorethink_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:generate ../gen_tests/gen_tests.sh
1+
//go:generate ../../gen_tests/gen_tests.sh
22

33
package reql_tests
44

0 commit comments

Comments
 (0)