Skip to content

Commit

Permalink
Update more tests to not rely on filegroup
Browse files Browse the repository at this point in the history
  • Loading branch information
katre committed Jan 26, 2021
1 parent feeafaf commit 27af9d3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 27af9d3

Please sign in to comment.