Skip to content

Conversation

trabetti
Copy link
Contributor

@trabetti trabetti commented Aug 2, 2018

added ability to specify a test (e.g. //test/common/common:assert_test) or a test group (e.g. //test/common/...) when building with docker release

Signed-off-by: trabetti talis@il.ibm.com

Description: When compiling with Docker for development, I found it useful to compile and run only one test which I am currently working on, so I updated locally the do_ci.sh script to accommodate this option.
I thought I can suggest it as a PR, maybe it can be useful for someone else. If seems unnecessary, feel free to close...

example usage:
ENVOY_DOCKER_BUILD_DIR=~/envoy_fork/build-debug ./ci/run_envoy_docker.sh './ci/do_ci.sh bazel.release //test/common/stats:thread_local_store_test'

Risk Level: Low
Testing:
Docs Changes: ci/README.md
Release Notes:

… or test dir (e.g. //test/common/...) when building with docker release

Signed-off-by: trabetti <talis@il.ibm.com>
@trabetti trabetti changed the title added ability to specify a test or a test group when building with docker release Ability to specify a test or a test group when building with docker release Aug 2, 2018
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense to me. Thank you! Small nit.

ci/do_ci.sh Outdated
# Run only specified tests.
bazel --batch test ${BAZEL_TEST_OPTIONS} -c opt $2
else
echo "Testing..."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: indent got a bit messed up here.

Signed-off-by: trabetti <talis@il.ibm.com>
Signed-off-by: trabetti <talis@il.ibm.com>
ci/do_ci.sh Outdated
bazel --batch test ${BAZEL_TEST_OPTIONS} -c opt //test/...

if [[ $# > 2 ]]; then
echo "Multiple tests are not supported, only $2 will run"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: inconsistent indent. Also, couldn't we run more than 2 if we do some shifting of args and then wildcard arguments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, it is quite simple, did not think of it. Do you think this option should be added to other targets beside release?

@mattklein123 mattklein123 self-assigned this Aug 2, 2018
Signed-off-by: trabetti <talis@il.ibm.com>
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is great. I would say let's just merge this and we can add to other targets later if people want them? (I can see dbg being useful also).

@mattklein123 mattklein123 merged commit d5bbd1e into envoyproxy:master Aug 5, 2018
@trabetti trabetti deleted the docker_compile_with_test branch August 5, 2018 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants