Skip to content

Commit

Permalink
Update SkyframeTests to not rely on filegroup not using toolchain
Browse files Browse the repository at this point in the history
resolution.

Part of work on bazelbuild#12899.

Closes bazelbuild#12907.

PiperOrigin-RevId: 353937486
  • Loading branch information
katre authored and Copybara-Service committed Jan 26, 2021
1 parent f31e867 commit 13031e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -221,7 +221,8 @@ public void testRegisteredExecutionPlatforms_targetPattern_flagOverride() throws
@Test
public void testRegisteredExecutionPlatforms_notExecutionPlatform() throws Exception {
rewriteWorkspace("register_execution_platforms(", " '//error:not_an_execution_platform')");
scratch.file("error/BUILD", "filegroup(name = 'not_an_execution_platform')");
// Have to use a rule that doesn't require a target platform, or else there will be a cycle.
scratch.file("error/BUILD", "toolchain_type(name = 'not_an_execution_platform')");

// Request the executionPlatforms.
SkyKey executionPlatformsKey = RegisteredExecutionPlatformsValue.key(targetConfigKey);
Expand Down
Expand Up @@ -299,7 +299,8 @@ public void resolve_invalidHostPlatform() throws Exception {

@Test
public void resolve_invalidExecutionPlatform() throws Exception {
scratch.file("invalid/BUILD", "filegroup(name = 'not_a_platform')");
// Have to use a rule that doesn't require a target platform, or else there will be a cycle.
scratch.file("invalid/BUILD", "toolchain_type(name = 'not_a_platform')");
useConfiguration("--extra_execution_platforms=//invalid:not_a_platform");
ToolchainContextKey key =
ToolchainContextKey.key()
Expand Down

0 comments on commit 13031e5

Please sign in to comment.