-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sctest: Add a test that runs comparator testing from logictest stmts
This commit introduced a new test that takes as input a path to a corpus file (of stmts collected from logic tests) and feed them into the comparator testing framework. It also edit the existing nightly such that we now collect the corpus and immediately feed them into the comparator testing framework, without having to store them in the cloud in between. Release note: None
- Loading branch information
Showing
5 changed files
with
74 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
build/teamcity/cockroach/nightlies/schema_changer_comparator_nightly_impl.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -xeuo pipefail | ||
|
||
dir="$(dirname $(dirname $(dirname $(dirname "${0}"))))" | ||
source "$dir/teamcity-support.sh" | ||
|
||
CORPUS_DIR=/artifacts/logictest-stmts-corpus-dir # dir to store all collected corpus file(s) | ||
exit_status=0 | ||
|
||
# Collect sql logic tests statements corpus. | ||
bazel run -- //pkg/cmd/generate-logictest-corpus:generate-logictest-corpus \ | ||
-out-dir=$CORPUS_DIR \ | ||
|| exit_status=$? | ||
|
||
bazel build //pkg/cmd/bazci --config=ci | ||
BAZEL_BIN=$(bazel info bazel-bin --config=ci) | ||
|
||
# Run schema changer comparator test with statements from the collected corpus file(s). | ||
for CORPUS_FILE in "$CORPUS_DIR"/* | ||
do | ||
$BAZEL_BIN/pkg/cmd/bazci/bazci_/bazci test -- --config=ci \ | ||
//pkg/sql/schemachanger:schemachanger_test \ | ||
--test_arg=--logictest-stmt-corpus-path="$CORPUS_FILE" \ | ||
--test_filter='^TestComparatorFromLogicTests$' \ | ||
--test_env=GO_TEST_WRAP_TESTV=1 \ | ||
--test_env=GO_TEST_WRAP=1 \ | ||
--test_timeout=7200 \ | ||
|| exit_status=$? | ||
done | ||
|
||
exit $exit_status |
22 changes: 0 additions & 22 deletions
22
build/teamcity/cockroach/nightlies/sqllogic_statements_corpus_nightly_impl.sh
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters