@Test public void ndkCxxPlatforms() throws IOException { AssumeAndroidPlatform.assumeNdkIsAvailable(); ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, "simple", tmp); workspace.setUp(); workspace.runBuckCommand("build", "//foo:simple#android-arm").assertSuccess(); workspace.runBuckCommand("build", "//foo:simple#android-armv7").assertSuccess(); workspace.runBuckCommand("build", "//foo:simple#android-x86").assertSuccess(); }
@Test public void whenSourceInputRemovedThenRebuildFails() throws IOException, InterruptedException { AssumeAndroidPlatform.assumeNdkIsAvailable(); final ProjectWorkspace workspace = TestDataHelper.createProjectWorkspaceForScenario(this, "file_watching", tmp); workspace.setUp(); workspace.runBuckdCommand("build", "//java/com/example/activity:activity").assertSuccess(); String fileName = "java/com/example/activity/MyFirstActivity.java"; Files.delete(workspace.getPath(fileName)); try { workspace.runBuckdCommand("build", "//java/com/example/activity:activity"); fail("Should have thrown HumanReadableException."); } catch (java.lang.RuntimeException e) { assertThat( "Failure should have been due to file removal.", e.getMessage(), containsString("MyFirstActivity.java")); } }