diff options
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java')
-rw-r--r-- | src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java b/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java index c4baaa2093..715b7920b4 100644 --- a/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java +++ b/src/test/java/com/google/devtools/build/lib/standalone/StandaloneSpawnStrategyTest.java @@ -191,7 +191,10 @@ public class StandaloneSpawnStrategyTest extends TestCase { // Test an action with environment variables set indicating an action running on a darwin host // system. Such actions should fail given the fact that these tests run on a non darwin // architecture. - public void testActionOnDarwin() throws Exception { + public void testIOSEnvironmentOnNonDarwin() throws Exception { + if (OS.getCurrent() == OS.DARWIN) { + return; + } Spawn spawn = new BaseSpawn.Local(Arrays.asList("/bin/sh", "-c", "echo $SDKROOT"), ImmutableMap.<String, String>of(AppleConfiguration.APPLE_SDK_VERSION_ENV_NAME, "8.4", AppleConfiguration.APPLE_SDK_PLATFORM_ENV_NAME, "iPhoneSimulator"), @@ -199,16 +202,9 @@ public class StandaloneSpawnStrategyTest extends TestCase { try { run(spawn); - if (OS.getCurrent() != OS.DARWIN) { - fail("action should fail due to being unable to resolve SDKROOT"); - } - + fail("action should fail due to being unable to resolve SDKROOT"); } catch (ExecException e) { - if (OS.getCurrent() != OS.DARWIN) { - assertThat(e.getMessage()).contains("Cannot locate iOS SDK on non-darwin operating system"); - } else { - fail("This test should pass on OSX."); - } + assertThat(e.getMessage()).contains("Cannot locate iOS SDK on non-darwin operating system"); } } } |