From 7f67f074a1b6a4cc7645958061d979e4d57953c9 Mon Sep 17 00:00:00 2001 From: Rodrigo Queiro Date: Thu, 19 Apr 2018 18:51:20 +0200 Subject: [PATCH] Limit `bazel test` parallelism more precisely (#1094) Since it is only the tests in cartographer/cloud that cannot run concurrently with each other, use `tags = ["exclusive"]` to say that they should not be run at the same time as other tests. This works locally, not just in CI, and should speed up the CI job by 2-3 minutes. --- .bazelci/presubmit.yml | 3 --- cartographer/cloud/BUILD.bazel | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml index 58220f5..b7a02ef 100644 --- a/.bazelci/presubmit.yml +++ b/.bazelci/presubmit.yml @@ -3,8 +3,5 @@ platforms: ubuntu1604: build_targets: - "..." - # Tests cannot run concurrently as some of them open the same port. - test_flags: - - "--jobs=1" test_targets: - "..." diff --git a/cartographer/cloud/BUILD.bazel b/cartographer/cloud/BUILD.bazel index b491564..2cb0a6c 100644 --- a/cartographer/cloud/BUILD.bazel +++ b/cartographer/cloud/BUILD.bazel @@ -89,6 +89,8 @@ cc_binary( name = src.replace("/", "_").replace(".cc", ""), srcs = [src], data = ["//:configuration_files"], + # Tests cannot run concurrently as some of them open the same port. + tags = ["exclusive"], deps = [ ":cartographer_grpc", "@com_google_googletest//:gtest_main",