use of com.facebook.buck.testutil.integration.ZipInspector in project buck by facebook.
the class AndroidBinaryIntegrationTest method testCxxLibraryDep.
@Test
public void testCxxLibraryDep() throws IOException {
String target = "//apps/sample:app_cxx_lib_dep";
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/libgnustl_shared.so");
zipInspector.assertFileExists("lib/armeabi-v7a/libnative_cxx_lib.so");
zipInspector.assertFileExists("lib/armeabi-v7a/libgnustl_shared.so");
zipInspector.assertFileExists("lib/x86/libnative_cxx_lib.so");
zipInspector.assertFileExists("lib/x86/libgnustl_shared.so");
}
use of com.facebook.buck.testutil.integration.ZipInspector in project buck by facebook.
the class AndroidBinaryIntegrationTest method testStaticCxxLibraryDep.
@Test
public void testStaticCxxLibraryDep() throws IOException {
String target = "//apps/sample:app_static_cxx_lib_dep";
workspace.runBuckCommand("build", target).assertSuccess();
ZipInspector zipInspector = new ZipInspector(workspace.getPath(BuildTargets.getGenPath(filesystem, BuildTargetFactory.newInstance(target), "%s.apk")));
zipInspector.assertFileExists("lib/x86/libnative_cxx_foo1.so");
zipInspector.assertFileExists("lib/x86/libnative_cxx_foo2.so");
zipInspector.assertFileDoesNotExist("lib/x86/libnative_cxx_bar.so");
}
use of com.facebook.buck.testutil.integration.ZipInspector in project buck by facebook.
the class AndroidExopackageBinaryIntegrationTest method testNativeExopackageHasNoNativeLibraries.
@Test
public void testNativeExopackageHasNoNativeLibraries() throws IOException {
ZipInspector zipInspector = new ZipInspector(workspace.getPath("buck-out/gen/apps/multidex/app-native-exo.apk"));
zipInspector.assertFileDoesNotExist("assets/secondary-program-dex-jars/metadata.txt");
zipInspector.assertFileExists("classes2.dex");
zipInspector.assertFileExists("classes.dex");
assertNativeLibrariesDontExist(zipInspector);
}
use of com.facebook.buck.testutil.integration.ZipInspector in project buck by facebook.
the class AndroidPrebuiltAarIntegrationTest method testBuildAndroidPrebuiltAar.
@Test
public void testBuildAndroidPrebuiltAar() throws IOException {
String target = "//:app";
workspace.runBuckBuild(target).assertSuccess();
ZipInspector zipInspector = new ZipInspector(workspace.getPath(BuildTargets.getGenPath(new ProjectFilesystem(workspace.getDestPath()), BuildTargetFactory.newInstance(target), "%s.apk")));
zipInspector.assertFileExists("AndroidManifest.xml");
zipInspector.assertFileExists("resources.arsc");
zipInspector.assertFileExists("classes.dex");
zipInspector.assertFileExists("lib/x86/liba.so");
}
use of com.facebook.buck.testutil.integration.ZipInspector in project buck by facebook.
the class AndroidResourceFilterIntegrationTest method testApkWithXhdpiAndHdpiFilter.
@Test
public void testApkWithXhdpiAndHdpiFilter() throws IOException {
String target = "//apps/sample:app_hdpi_xhdpi";
ProjectWorkspace.ProcessResult result = workspace.runBuckCommand("build", target);
result.assertSuccess();
Path apkFile = workspace.getPath(BuildTargets.getGenPath(filesystem, BuildTargetFactory.newInstance(target), "%s.apk"));
ZipInspector zipInspector = new ZipInspector(apkFile);
if (isBuildToolsNew) {
zipInspector.assertFileDoesNotExist("res/drawable-mdpi-v4/app_icon.png");
zipInspector.assertFileExists("res/drawable-hdpi-v4/app_icon.png");
zipInspector.assertFileExists("res/drawable-xhdpi-v4/app_icon.png");
} else {
zipInspector.assertFileDoesNotExist("res/drawable-mdpi/app_icon.png");
zipInspector.assertFileExists("res/drawable-hdpi/app_icon.png");
zipInspector.assertFileExists("res/drawable-xhdpi/app_icon.png");
}
}
Aggregations