From 74ff36409b8e34dfa6579cdb531f8126d0a01e59 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Sat, 19 Sep 2020 12:14:57 +0100 Subject: [PATCH 1/3] Split verify_examples tests This allows you to run `verify_build_configs` and `run_examples` independently, making it easier to verify an added sandbox locally. Signed-off-by: Ryan Northey --- ci/verify_examples.sh | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/ci/verify_examples.sh b/ci/verify_examples.sh index ef5a1101095d7..03b9f3692eb58 100755 --- a/ci/verify_examples.sh +++ b/ci/verify_examples.sh @@ -1,6 +1,7 @@ #!/bin/bash -E -TESTFILTER="${1:-*}" +TESTCOMMAND="${1:-}" +TESTFILTER="${2:-*}" FAILED=() SRCDIR="${SRCDIR:-$(pwd)}" EXCLUDED_BUILD_CONFIGS=${EXCLUDED_BUILD_CONFIGS:-"^./cache/responses.yaml|^./jaeger-native-tracing|docker-compose"} @@ -54,9 +55,23 @@ verify_build_configs () { fi } -verify_build_configs -run_examples - +case "$TESTCOMMAND" in + build_config) + echo "Running build_configs test" + verify_build_configs + ;; + sandbox) + echo "Running sandbox test" + run_examples + ;; + "") + echo "Running all tests" + verify_build_configs + run_examples + ;; + *) + echo "Usage ./ci/verify_examples.sh [build_config|sandbox] []" +esac if [[ "${#FAILED[@]}" -ne "0" ]]; then echo "TESTS FAILED:" From 39a73e580e32d6bc3c54082e9af1e16420cf80a4 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Sat, 19 Sep 2020 12:26:48 +0100 Subject: [PATCH 2/3] add all flag to allow filter arg passthrough Signed-off-by: Ryan Northey --- ci/verify_examples.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/verify_examples.sh b/ci/verify_examples.sh index 03b9f3692eb58..881f1bb425a29 100755 --- a/ci/verify_examples.sh +++ b/ci/verify_examples.sh @@ -64,7 +64,7 @@ case "$TESTCOMMAND" in echo "Running sandbox test" run_examples ;; - "") + ""|all) echo "Running all tests" verify_build_configs run_examples From eece7ee1c5f836d1584cef3d78d8f66a7ca63683 Mon Sep 17 00:00:00 2001 From: Ryan Northey Date: Mon, 21 Sep 2020 06:57:40 +0100 Subject: [PATCH 3/3] Minor cleanup of usage output Signed-off-by: Ryan Northey --- ci/verify_examples.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/verify_examples.sh b/ci/verify_examples.sh index 881f1bb425a29..4d65fa2c5bcf9 100755 --- a/ci/verify_examples.sh +++ b/ci/verify_examples.sh @@ -70,7 +70,7 @@ case "$TESTCOMMAND" in run_examples ;; *) - echo "Usage ./ci/verify_examples.sh [build_config|sandbox] []" + echo "Usage: ./ci/verify_examples.sh [build_config|sandbox|all] []" esac if [[ "${#FAILED[@]}" -ne "0" ]]; then