use of com.facebook.buck.testutil.integration.ZipInspector in project buck by facebook.
the class AndroidBinaryIntegrationTest method testRawSplitDexHasSecondary.
@Test
public void testRawSplitDexHasSecondary() throws IOException {
ProjectWorkspace.ProcessResult result = workspace.runBuckCommand("build", RAW_DEX_TARGET);
result.assertSuccess();
ZipInspector zipInspector = new ZipInspector(workspace.getPath(BuildTargets.getGenPath(filesystem, BuildTargetFactory.newInstance(RAW_DEX_TARGET), "%s.apk")));
zipInspector.assertFileDoesNotExist("assets/secondary-program-dex-jars/metadata.txt");
zipInspector.assertFileDoesNotExist("assets/secondary-program-dex-jars/secondary-1.dex.jar");
zipInspector.assertFileExists("classes2.dex");
zipInspector.assertFileExists("classes.dex");
zipInspector.assertFileExists("lib/armeabi/libfakenative.so");
}
use of com.facebook.buck.testutil.integration.ZipInspector in project buck by facebook.
the class AndroidBinaryIntegrationTest method testCxxLibraryDepClang.
@Test
public void testCxxLibraryDepClang() throws IOException {
String target = "//apps/sample:app_cxx_lib_dep";
ProjectWorkspace.ProcessResult result = workspace.runBuckCommand("build", "-c", "ndk.compiler=clang", "-c", "ndk.cxx_runtime=libcxx", target);
result.assertSuccess();
ZipInspector zipInspector = new ZipInspector(workspace.getPath(BuildTargets.getGenPath(filesystem, BuildTargetFactory.newInstance(target), "%s.apk")));
zipInspector.assertFileExists("lib/armeabi/libnative_cxx_lib.so");
zipInspector.assertFileExists("lib/armeabi/libc++_shared.so");
zipInspector.assertFileExists("lib/armeabi-v7a/libnative_cxx_lib.so");
zipInspector.assertFileExists("lib/armeabi-v7a/libc++_shared.so");
zipInspector.assertFileExists("lib/x86/libnative_cxx_lib.so");
zipInspector.assertFileExists("lib/x86/libc++_shared.so");
}
use of com.facebook.buck.testutil.integration.ZipInspector in project buck by facebook.
the class AndroidBinaryIntegrationTest method testNoCxxDepsDoesNotIncludeNdkRuntime.
@Test
public void testNoCxxDepsDoesNotIncludeNdkRuntime() throws IOException {
String target = "//apps/sample:app_no_cxx_deps";
workspace.runBuckCommand("build", target).assertSuccess();
ZipInspector zipInspector = new ZipInspector(workspace.getPath(BuildTargets.getGenPath(filesystem, BuildTargetFactory.newInstance(target), "%s.apk")));
zipInspector.assertFileDoesNotExist("lib/armeabi/libgnustl_shared.so");
zipInspector.assertFileDoesNotExist("lib/armeabi-v7a/libgnustl_shared.so");
zipInspector.assertFileDoesNotExist("lib/x86/libgnustl_shared.so");
}
use of com.facebook.buck.testutil.integration.ZipInspector in project buck by facebook.
the class AndroidBinaryIntegrationTest method testCxxLibraryDepWithNoFilters.
@Test
public void testCxxLibraryDepWithNoFilters() throws IOException {
String target = "//apps/sample:app_cxx_lib_dep_no_filters";
workspace.runBuckCommand("build", target).assertSuccess();
ZipInspector zipInspector = new ZipInspector(workspace.getPath(BuildTargets.getGenPath(filesystem, BuildTargetFactory.newInstance(target), "%s.apk")));
zipInspector.assertFileExists("lib/armeabi/libnative_cxx_lib.so");
zipInspector.assertFileExists("lib/armeabi-v7a/libnative_cxx_lib.so");
zipInspector.assertFileExists("lib/x86/libnative_cxx_lib.so");
}
use of com.facebook.buck.testutil.integration.ZipInspector in project buck by facebook.
the class AndroidBinaryIntegrationTest method testCxxLibraryAsAsset.
@Test
public void testCxxLibraryAsAsset() throws IOException {
String target = "//apps/sample:app_cxx_lib_asset";
workspace.runBuckCommand("build", target).assertSuccess();
ZipInspector zipInspector = new ZipInspector(workspace.getPath(BuildTargets.getGenPath(filesystem, BuildTargetFactory.newInstance(target), "%s.apk")));
zipInspector.assertFileExists("assets/lib/x86/libnative_cxx_libasset.so");
zipInspector.assertFileDoesNotExist("lib/x86/libnative_cxx_libasset.so");
zipInspector.assertFileExists("lib/x86/libnative_cxx_foo1.so");
zipInspector.assertFileExists("lib/x86/libnative_cxx_foo2.so");
zipInspector.assertFileDoesNotExist("assets/lib/x86/libnative_cxx_foo1.so");
zipInspector.assertFileDoesNotExist("assets/lib/x86/libnative_cxx_foo2.so");
}
Aggregations