Search in sources :

Example 1 with BuckBuildLog

use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.

the class AndroidBinaryIntegrationTest method testEditingSecondaryDexClassForcesRebuildForSimplePackage.

@Test
public void testEditingSecondaryDexClassForcesRebuildForSimplePackage() throws IOException {
    workspace.replaceFileContents("java/com/sample/lib/Sample.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);
}
Also used : ProjectWorkspace(com.facebook.buck.testutil.integration.ProjectWorkspace) BuckBuildLog(com.facebook.buck.testutil.integration.BuckBuildLog) Test(org.junit.Test)

Example 2 with BuckBuildLog

use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.

the class AndroidBinaryIntegrationTest method testNotAllJavaLibrariesFetched.

@Test
public void testNotAllJavaLibrariesFetched() throws IOException {
    String target = "//apps/multidex:app_with_deeper_deps";
    workspace.runBuckCommand("build", target).assertSuccess();
    workspace.replaceFileContents("java/com/sample/app/MyApplication.java", "package com", "package\ncom");
    workspace.resetBuildLogFile();
    workspace.runBuckCommand("build", target).assertSuccess();
    BuckBuildLog buildLog = workspace.getBuildLog();
    buildLog.assertTargetBuiltLocally(target);
    buildLog.assertTargetIsAbsent("//java/com/sample/lib:lib");
}
Also used : BuckBuildLog(com.facebook.buck.testutil.integration.BuckBuildLog) CoreMatchers.containsString(org.hamcrest.CoreMatchers.containsString) Test(org.junit.Test)

Example 3 with BuckBuildLog

use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.

the class AndroidExopackageBinaryIntegrationTest method testEditingImageForcesRebuild.

@Test
public void testEditingImageForcesRebuild() throws IOException {
    workspace.copyFile("res/com/sample/top/res/drawable/tiny_white.png", "res/com/sample/top/res/drawable/tiny_something.png");
    workspace.resetBuildLogFile();
    workspace.runBuckBuild(DEX_EXOPACKAGE_TARGET).assertSuccess();
    BuckBuildLog buildLog = workspace.getBuildLog();
    buildLog.assertTargetBuiltLocally(DEX_EXOPACKAGE_TARGET);
}
Also used : BuckBuildLog(com.facebook.buck.testutil.integration.BuckBuildLog) Test(org.junit.Test)

Example 4 with BuckBuildLog

use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.

the class AndroidExopackageBinaryIntegrationTest method testEditingAssetForcesRebuild.

@Test
public void testEditingAssetForcesRebuild() throws IOException {
    workspace.replaceFileContents("res/com/sample/base/buck-assets/hilarity.txt", "banana", "kiwi");
    workspace.resetBuildLogFile();
    workspace.runBuckBuild(DEX_EXOPACKAGE_TARGET).assertSuccess();
    BuckBuildLog buildLog = workspace.getBuildLog();
    buildLog.assertTargetBuiltLocally(DEX_EXOPACKAGE_TARGET);
}
Also used : BuckBuildLog(com.facebook.buck.testutil.integration.BuckBuildLog) Test(org.junit.Test)

Example 5 with BuckBuildLog

use of com.facebook.buck.testutil.integration.BuckBuildLog in project buck by facebook.

the class AndroidExopackageBinaryIntegrationTest method testEditingThirdPartyJarForcesRebuild.

@Test
public void testEditingThirdPartyJarForcesRebuild() throws IOException {
    workspace.copyFile("third-party/kiwi-2.0.jar", "third-party/kiwi-current.jar");
    workspace.resetBuildLogFile();
    workspace.runBuckBuild(DEX_EXOPACKAGE_TARGET).assertSuccess();
    BuckBuildLog buildLog = workspace.getBuildLog();
    buildLog.assertTargetBuiltLocally(DEX_EXOPACKAGE_TARGET);
}
Also used : BuckBuildLog(com.facebook.buck.testutil.integration.BuckBuildLog) Test(org.junit.Test)

Aggregations

BuckBuildLog (com.facebook.buck.testutil.integration.BuckBuildLog)88 Test (org.junit.Test)88 ProjectWorkspace (com.facebook.buck.testutil.integration.ProjectWorkspace)53 BuildTarget (com.facebook.buck.model.BuildTarget)32 OcamlRuleBuilder.createStaticLibraryBuildTarget (com.facebook.buck.ocaml.OcamlRuleBuilder.createStaticLibraryBuildTarget)10 ProcessExecutor (com.facebook.buck.util.ProcessExecutor)9 Path (java.nio.file.Path)8 ProjectFilesystem (com.facebook.buck.io.ProjectFilesystem)7 ExecutableFinder (com.facebook.buck.io.ExecutableFinder)2 Sha1HashCode (com.facebook.buck.util.sha1.Sha1HashCode)2 ImmutableList (com.google.common.collect.ImmutableList)2 ImmutableSet (com.google.common.collect.ImmutableSet)2 ImmutableSortedSet (com.google.common.collect.ImmutableSortedSet)2 NSString (com.dd.plist.NSString)1 AssumeAndroidPlatform (com.facebook.buck.android.AssumeAndroidPlatform)1 ArtifactCache (com.facebook.buck.artifact_cache.ArtifactCache)1 FakeBuckConfig (com.facebook.buck.cli.FakeBuckConfig)1 CxxBuckConfig (com.facebook.buck.cxx.CxxBuckConfig)1 CxxFlavorSanitizer.sanitize (com.facebook.buck.cxx.CxxFlavorSanitizer.sanitize)1 CxxPlatform (com.facebook.buck.cxx.CxxPlatform)1