diff options
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/rules/platform/PlatformTest.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/rules/platform/PlatformTest.java b/src/test/java/com/google/devtools/build/lib/rules/platform/PlatformTest.java index cbe1edc135..e4102bdf94 100644 --- a/src/test/java/com/google/devtools/build/lib/rules/platform/PlatformTest.java +++ b/src/test/java/com/google/devtools/build/lib/rules/platform/PlatformTest.java @@ -120,6 +120,22 @@ public class PlatformTest extends BuildViewTestCase { } @Test + public void hostPlatformRemoteProperties_fromFlag() throws Exception { + useConfiguration("--host_platform_remote_properties_override='flag properties'"); + + scratch.file( + "autoconfig/BUILD", "platform(name = 'host_platform',", " host_platform = True,", ")"); + + // Check the host platform. + ConfiguredTarget hostPlatform = getConfiguredTarget("//autoconfig:host_platform"); + assertThat(hostPlatform).isNotNull(); + + PlatformInfo hostPlatformProvider = PlatformProviderUtils.platform(hostPlatform); + assertThat(hostPlatformProvider).isNotNull(); + assertThat(hostPlatformProvider.remoteExecutionProperties()).isEqualTo("'flag properties'"); + } + + @Test public void testPlatform_overlappingConstraintValueError() throws Exception { checkError( "constraint/overlap", |