aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/rules
diff options
context:
space:
mode:
authorGravatar John Cater <jcater@google.com>2018-07-27 14:10:09 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-07-27 14:13:39 -0700
commitc809afca846de06a2c248d8df5fa4b43b9bcfcdd (patch)
treeec104f2fc3b16412a64882277a286af85198a003 /src/test/java/com/google/devtools/build/lib/rules
parentbe88b8539b30d1c36c68b0f6acfe1e9ae010db3b (diff)
Make sure the --host_platform_remote_properties_override flags is
honored when creating the host platform. Fixes #5695. Change-Id: Iaa99c8189421893440e5e5140450c70de69d7b86 Closes #5696. Change-Id: Iaa99c8189421893440e5e5140450c70de69d7b86 PiperOrigin-RevId: 206371468
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/rules')
-rw-r--r--src/test/java/com/google/devtools/build/lib/rules/platform/PlatformTest.java16
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",