-
Notifications
You must be signed in to change notification settings - Fork 581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to run full test suite in run-e2e.sh #6694
Add support to run full test suite in run-e2e.sh #6694
Conversation
…only-channels-associated-with-an-individual-test
…only-channels-associated-with-an-individual-test
…only-channels-associated-with-an-individual-test
…-single-test-suite-instead-on-each-host-instead-of-one-test-per-host
@@ -31,13 +31,7 @@ function _verify_dependencies() { | |||
|
|||
# _select_test_config lets you dynamically select a test config for the specific test. | |||
function _select_test_config() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive by fix
function run_test() { | ||
# if the dev configs directory is present, enable fzf completion to select a test config file to use. | ||
|
||
# if test is set, that is used directly, otherwise the test can be interactively provided if fzf is installed. | ||
TEST="$(_get_test ${TEST})" | ||
|
||
# if jq is installed, we can automatically determine the test entrypoint. | ||
if command -v jq > /dev/null; then | ||
cd .. | ||
ENTRY_POINT="$(go run -mod=readonly cmd/build_test_matrix/main.go | jq -r --arg TEST "${TEST}" '.include[] | select( .test == $TEST) | .entrypoint')" | ||
cd - > /dev/null | ||
fi | ||
|
||
|
||
# find the name of the file that has this test in it. | ||
test_file="$(grep --recursive --files-with-matches './' -e "${TEST}()")" | ||
|
||
# we run the test on the directory as specific files may reference types in other files but within the package. | ||
test_dir="$(dirname $test_file)" | ||
|
||
# run the test file directly, this allows log output to be streamed directly in the terminal sessions | ||
# without needed to wait for the test to finish. | ||
# it shouldn't take 30m, but the wasm test can be quite slow, so we can be generous. | ||
go test -v "${test_dir}" --run ${ENTRY_POINT} -testify.m ^${TEST}$ -timeout 30m | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was the existing logic that was pulled into a new fn
…-single-test-suite-instead-on-each-host-instead-of-one-test-per-host
…-single-test-suite-instead-on-each-host-instead-of-one-test-per-host
…-single-test-suite-instead-on-each-host-instead-of-one-test-per-host
…-single-test-suite-instead-on-each-host-instead-of-one-test-per-host
…-single-test-suite-instead-on-each-host-instead-of-one-test-per-host
Quality Gate passed for 'ibc-go'Issues Measures |
test_file="$(grep --recursive --files-with-matches './tests' -e "${ENTRY_POINT}")" | ||
test_dir="$(dirname $test_file)" | ||
|
||
# TODO: add the -p flag to run tests in parallel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[q] do we have an issue to make sure we don't forget? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all this stuff is kind of building up to close this issue #5317 , so that won't be complete until we can actually run tests in parallel
Description
Follow up to #6685
This PR allows a full test suite to be run locally.
Note: not all tests will pass locally, since they do things like change params which will mess with each other.
They also do not yet run in parallel. This will be done in a followup.
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.