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
chatton
commented
Jun 26, 2024
| @@ -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() { | |||
Comment on lines
+53
to
+77
| 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 | ||
| } |
Contributor
Author
There was a problem hiding this comment.
this was the existing logic that was pulled into a new fn
damiannolan
approved these changes
Jun 26, 2024
…-single-test-suite-instead-on-each-host-instead-of-one-test-per-host
10 tasks
…-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
|
bznein
approved these changes
Jul 1, 2024
| 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 |
Contributor
There was a problem hiding this comment.
[q] do we have an issue to make sure we don't forget? :)
Contributor
Author
There was a problem hiding this comment.
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
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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/).godoccomments.Files changedin the GitHub PR explorer.SonarCloud Reportin the comment section below once CI passes.