Skip to content

Commit 13031e5

Browse files
katrecopybara-github
authored andcommitted
Update SkyframeTests to not rely on filegroup not using toolchain
resolution. Part of work on #12899. Closes #12907. PiperOrigin-RevId: 353937486
1 parent f31e867 commit 13031e5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/test/java/com/google/devtools/build/lib/skyframe/RegisteredExecutionPlatformsFunctionTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ public void testRegisteredExecutionPlatforms_targetPattern_flagOverride() throws
221221
@Test
222222
public void testRegisteredExecutionPlatforms_notExecutionPlatform() throws Exception {
223223
rewriteWorkspace("register_execution_platforms(", " '//error:not_an_execution_platform')");
224-
scratch.file("error/BUILD", "filegroup(name = 'not_an_execution_platform')");
224+
// Have to use a rule that doesn't require a target platform, or else there will be a cycle.
225+
scratch.file("error/BUILD", "toolchain_type(name = 'not_an_execution_platform')");
225226

226227
// Request the executionPlatforms.
227228
SkyKey executionPlatformsKey = RegisteredExecutionPlatformsValue.key(targetConfigKey);

src/test/java/com/google/devtools/build/lib/skyframe/ToolchainResolutionFunctionTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ public void resolve_invalidHostPlatform() throws Exception {
299299

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

0 commit comments

Comments
 (0)