Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Bazel patch to mark tests as exclusive #4918

Merged
merged 2 commits into from
Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ledger/ledger-api-test-tool-on-canton/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ conformance_test(
],
runner = "@//bazel_tools/client_server/runner:runner",
server = ":canton-test-runner-with-dependencies",
# NOTE (MK): Canton tries to access ~/.ammonite/cache for the coursier cache which fails with sandboxing
# and caching. This might be fixable by overriding COURSIER_CACHE.
tags = ["local"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense to me. Thanks for the workaround.

test_tool_args = [
"--verbose",
"--include=SemanticTests",
Expand Down
15 changes: 15 additions & 0 deletions nix/nixpkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ let
wrapProgram $out/bin/pg_tmp --prefix PATH : ${pkgs.postgresql_9_6}/bin:$out/bin
'';
});
bazel = pkgs.bazel.overrideAttrs(oldAttrs: {
patches = oldAttrs.patches ++ [
# Note (MK)
# This patch enables caching of tests marked as `exclusive`. It got apparently
# rolled back because it caused problems internally at Google but it’s unclear
# what is actually failing and it seems to work fine for us.
# See https://github.com/bazelbuild/bazel/pull/8983/files#diff-107db037d4a55f2421fed9ed5c6cc31b
# for the only change that actually affects the code in this patch. The rest is tests
# and/or documentation.
(pkgs.fetchurl {
url = "https://patch-diff.githubusercontent.com/raw/bazelbuild/bazel/pull/8983.patch";
sha256 = "1j25bycn9q7536ab3ln6yi6zpzv2b25fwdyxbgnalkpl2dz9idb7";
})
];
});
};

nixpkgs = import src {
Expand Down