aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/internal_ci/helper_scripts/prepare_build_macos_rc
diff options
context:
space:
mode:
authorGravatar Matt Kwong <mattkwong@google.com>2017-08-23 11:43:40 -0700
committerGravatar Matt Kwong <mattkwong@google.com>2017-09-11 19:17:32 -0700
commit6d11e9092667565a181d051932e04c50ab1db099 (patch)
tree653291b554c5d18719e8d58fc38f0e67560b1089 /tools/internal_ci/helper_scripts/prepare_build_macos_rc
parent969936bdd871565640636b7d22d680cfd98d3853 (diff)
Add Kokoro test filtering for MacOS/Windows
Diffstat (limited to 'tools/internal_ci/helper_scripts/prepare_build_macos_rc')
-rw-r--r--tools/internal_ci/helper_scripts/prepare_build_macos_rc7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/internal_ci/helper_scripts/prepare_build_macos_rc b/tools/internal_ci/helper_scripts/prepare_build_macos_rc
index bd250957f4..2a1225683d 100644
--- a/tools/internal_ci/helper_scripts/prepare_build_macos_rc
+++ b/tools/internal_ci/helper_scripts/prepare_build_macos_rc
@@ -32,6 +32,13 @@ ulimit -a
sudo easy_install --upgrade google-api-python-client
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/GrpcTesting-d0eeee2db331.json
+# If this is a PR using RUN_TESTS_FLAGS var, then add flags to filter tests
+if [ -n "$KOKORO_GITHUB_PULL_REQUEST_NUMBER" ] && [ -n "$RUN_TESTS_FLAGS" ]; then
+ brew install jq
+ ghprbTargetBranch=$(curl -s https://api.github.com/repos/grpc/grpc/pulls/$KOKORO_GITHUB_PULL_REQUEST_NUMBER | jq -r .base.ref)
+ export RUN_TESTS_FLAGS="$RUN_TESTS_FLAGS --filter_pr_tests --base_branch origin/$ghprbTargetBranch"
+fi
+
# required to build protobuf
brew install gflags