use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.
the class PrecompiledHeaderIntegrationTest method changingCodeUsingPchWhenPchIsCachedButNotBuiltShouldBuildPch.
@Test
public void changingCodeUsingPchWhenPchIsCachedButNotBuiltShouldBuildPch() throws Exception {
assumeTrue(Platform.detect() != Platform.WINDOWS);
workspace.enableDirCache();
workspace.runBuckBuild("//:some_binary#default").assertSuccess();
workspace.runBuckCommand("clean");
workspace.writeContentsToPath("int lib_func() { return 0; }", "lib.c");
workspace.runBuckBuild("//:some_binary#default").assertSuccess();
BuckBuildLog buildLog = workspace.getBuildLog();
buildLog.assertTargetBuiltLocally(findPchTarget().toString());
assertThat(workspace.asCell().getFilesystem(), ProjectFilesystemMatchers.pathExists(workspace.getPath("buck-out/gen/" + findPchTarget().getShortNameAndFlavorPostfix() + ".h.gch")));
buildLog.assertTargetBuiltLocally("//:some_library#default,static");
}
use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.
the class AndroidBinaryIntegrationTest method testEditingRedexToolForcesRebuild.
@Test
public void testEditingRedexToolForcesRebuild() throws IOException {
workspace.replaceFileContents("tools/redex/fake_redex.py", "main()\n", "main() \n");
workspace.resetBuildLogFile();
workspace.runBuckBuild(APP_REDEX_TARGET).assertSuccess();
BuckBuildLog buildLog = workspace.getBuildLog();
buildLog.assertTargetBuiltLocally(APP_REDEX_TARGET);
}
use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.
the class AndroidBinaryIntegrationTest method testStripRulesAreShared.
@Test
public void testStripRulesAreShared() throws IOException {
workspace.runBuckCommand("build", "//apps/sample:app_cxx_lib_asset").assertSuccess();
workspace.resetBuildLogFile();
workspace.runBuckCommand("build", "//apps/sample:app_cxx_different_rule_name").assertSuccess();
BuckBuildLog buildLog = workspace.getBuildLog();
for (BuildTarget target : buildLog.getAllTargets()) {
String rawTarget = target.toString();
if (rawTarget.contains("libgnustl_shared.so")) {
// Stripping the C++ runtime is currently not shared.
continue;
}
if (rawTarget.contains("strip")) {
buildLog.assertNotTargetBuiltLocally(rawTarget);
}
}
}
use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.
the class AndroidBinaryIntegrationTest method testEditingPrimaryDexClassForcesRebuildForSimplePackage.
@Test
public void testEditingPrimaryDexClassForcesRebuildForSimplePackage() throws IOException {
workspace.replaceFileContents("java/com/sample/app/MyApplication.java", "package com", "package\ncom");
workspace.resetBuildLogFile();
ProjectWorkspace.ProcessResult result = workspace.runBuckCommand("build", SIMPLE_TARGET);
result.assertSuccess();
BuckBuildLog buildLog = workspace.getBuildLog();
buildLog.assertTargetBuiltLocally(SIMPLE_TARGET);
}
use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.
the class AndroidExopackageBinaryIntegrationTest method testEditingPrimaryDexClassForcesRebuildForExopackage.
@Test
public void testEditingPrimaryDexClassForcesRebuildForExopackage() throws IOException {
workspace.replaceFileContents("java/com/sample/app/MyApplication.java", "package com", "package\ncom");
workspace.resetBuildLogFile();
workspace.runBuckBuild(DEX_EXOPACKAGE_TARGET).assertSuccess();
BuckBuildLog buildLog = workspace.getBuildLog();
buildLog.assertTargetBuiltLocally(DEX_EXOPACKAGE_TARGET);
}
Aggregations