aapt2: move test resources to math structure of tests
@ -39,7 +39,7 @@ public class AndroidOreoNotSparseTest extends BaseTest {
|
||||
sTestOrigDir = new ExtFile(sTmpDir, "issue1594-orig");
|
||||
sTestNewDir = new ExtFile(sTmpDir, "issue1594-new");
|
||||
LOGGER.info("Unpacking not_sparse.apk...");
|
||||
TestUtils.copyResourceDir(AndroidOreoNotSparseTest.class, "brut/apktool/issue1594", sTestOrigDir);
|
||||
TestUtils.copyResourceDir(AndroidOreoNotSparseTest.class, "brut/apktool/aapt1/issue1594", sTestOrigDir);
|
||||
|
||||
File testApk = new File(sTestOrigDir, "not_sparse.apk");
|
||||
|
||||
|
@ -39,7 +39,7 @@ public class AndroidOreoSparseTest extends BaseTest {
|
||||
sTestOrigDir = new ExtFile(sTmpDir, "issue1594-orig");
|
||||
sTestNewDir = new ExtFile(sTmpDir, "issue1594-new");
|
||||
LOGGER.info("Unpacking sparse.apk...");
|
||||
TestUtils.copyResourceDir(AndroidOreoSparseTest.class, "brut/apktool/issue1594", sTestOrigDir);
|
||||
TestUtils.copyResourceDir(AndroidOreoSparseTest.class, "brut/apktool/aapt1/issue1594", sTestOrigDir);
|
||||
|
||||
File testApk = new File(sTestOrigDir, "sparse.apk");
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class BuildAndDecodeJarTest extends BaseTest {
|
||||
sTestOrigDir = new ExtFile(sTmpDir, "testjar-orig");
|
||||
sTestNewDir = new ExtFile(sTmpDir, "testjar-new");
|
||||
LOGGER.info("Unpacking testjar...");
|
||||
TestUtils.copyResourceDir(BuildAndDecodeJarTest.class, "brut/apktool/testjar/", sTestOrigDir);
|
||||
TestUtils.copyResourceDir(BuildAndDecodeJarTest.class, "brut/apktool/aapt1/testjar/", sTestOrigDir);
|
||||
|
||||
LOGGER.info("Building testjar.jar...");
|
||||
File testJar = new File(sTmpDir, "testjar.jar");
|
||||
|
@ -49,7 +49,7 @@ public class BuildAndDecodeTest extends BaseTest {
|
||||
sTestOrigDir = new ExtFile(sTmpDir, "testapp-orig");
|
||||
sTestNewDir = new ExtFile(sTmpDir, "testapp-new");
|
||||
LOGGER.info("Unpacking testapp...");
|
||||
TestUtils.copyResourceDir(BuildAndDecodeTest.class, "brut/apktool/testapp/", sTestOrigDir);
|
||||
TestUtils.copyResourceDir(BuildAndDecodeTest.class, "brut/apktool/aapt1/testapp/", sTestOrigDir);
|
||||
|
||||
LOGGER.info("Building testapp.apk...");
|
||||
File testApk = new File(sTmpDir, "testapp.apk");
|
||||
|
@ -44,7 +44,7 @@ public class DebugTagRetainedTest extends BaseTest {
|
||||
sTestOrigDir = new ExtFile(sTmpDir, "issue1235-orig");
|
||||
sTestNewDir = new ExtFile(sTmpDir, "issue1235-new");
|
||||
LOGGER.info("Unpacking issue1235...");
|
||||
TestUtils.copyResourceDir(DebugTagRetainedTest.class, "brut/apktool/issue1235/", sTestOrigDir);
|
||||
TestUtils.copyResourceDir(DebugTagRetainedTest.class, "brut/apktool/aapt1/issue1235/", sTestOrigDir);
|
||||
|
||||
LOGGER.info("Building issue1235.apk...");
|
||||
ApkOptions apkOptions = new ApkOptions();
|
||||
|
@ -42,7 +42,7 @@ public class DefaultBaksmaliVariableTest extends BaseTest {
|
||||
sTestOrigDir = new ExtFile(sTmpDir, "testjar-orig");
|
||||
sTestNewDir = new ExtFile(sTmpDir, "testjar-new");
|
||||
LOGGER.info("Unpacking testjar...");
|
||||
TestUtils.copyResourceDir(DefaultBaksmaliVariableTest.class, "brut/apktool/issue1481/", sTestOrigDir);
|
||||
TestUtils.copyResourceDir(DefaultBaksmaliVariableTest.class, "brut/apktool/aapt1/issue1481/", sTestOrigDir);
|
||||
|
||||
LOGGER.info("Building issue1481.jar...");
|
||||
File testJar = new File(sTmpDir, "issue1481.jar");
|
||||
|
@ -43,7 +43,7 @@ public class EmptyResourcesArscTest {
|
||||
sTestOrigDir = new ExtFile(sTmpDir, "issue1730-orig");
|
||||
sTestNewDir = new ExtFile(sTmpDir, "issue1730-new");
|
||||
LOGGER.info("Unpacking issue1730.apk...");
|
||||
TestUtils.copyResourceDir(EmptyResourcesArscTest.class, "brut/apktool/issue1730", sTestOrigDir);
|
||||
TestUtils.copyResourceDir(EmptyResourcesArscTest.class, "brut/apktool/aapt1/issue1730", sTestOrigDir);
|
||||
|
||||
File testApk = new File(sTestOrigDir, "issue1730.apk");
|
||||
|
||||
|
@ -34,7 +34,7 @@ public class LargeIntsInManifestTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(LargeIntsInManifestTest.class, "brut/apktool/issue767/", sTmpDir);
|
||||
TestUtils.copyResourceDir(LargeIntsInManifestTest.class, "brut/apktool/aapt1/issue767/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -41,7 +41,7 @@ public class ProviderAttributeTest extends BaseTest {
|
||||
public static void beforeClass() throws BrutException {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(ProviderAttributeTest.class, "brut/apktool/issue636/", sTmpDir);
|
||||
TestUtils.copyResourceDir(ProviderAttributeTest.class, "brut/apktool/aapt1/issue636/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -42,7 +42,7 @@ public class ReferenceVersionCodeTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(ReferenceVersionCodeTest.class, "brut/apktool/issue1234/", sTmpDir);
|
||||
TestUtils.copyResourceDir(ReferenceVersionCodeTest.class, "brut/apktool/aapt1/issue1234/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -37,7 +37,7 @@ public class SharedLibraryTest extends BaseTest {
|
||||
public static void beforeClass() throws BrutException {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(SharedLibraryTest.class, "brut/apktool/shared_libraries/", sTmpDir);
|
||||
TestUtils.copyResourceDir(SharedLibraryTest.class, "brut/apktool/aapt1/shared_libraries/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -34,7 +34,7 @@ public class SkipAssetTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(SkipAssetTest.class, "brut/apktool/issue1605/", sTmpDir);
|
||||
TestUtils.copyResourceDir(SkipAssetTest.class, "brut/apktool/aapt1/issue1605/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -39,7 +39,7 @@ public class UnknownCompressionTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(UnknownCompressionTest.class, "brut/apktool/unknown_compression/", sTmpDir);
|
||||
TestUtils.copyResourceDir(UnknownCompressionTest.class, "brut/apktool/aapt1/unknown_compression/", sTmpDir);
|
||||
|
||||
String apk = "deflated_unknowns.apk";
|
||||
ApkOptions apkOptions = new ApkOptions();
|
||||
|
@ -34,7 +34,7 @@ public class AndResGuardTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(AndResGuardTest.class, "brut/apktool/issue1170/", sTmpDir);
|
||||
TestUtils.copyResourceDir(AndResGuardTest.class, "brut/apktool/decode/issue1170/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -41,7 +41,7 @@ public class DecodeKotlinTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(DecodeKotlinTest.class, "brut/apktool/testkotlin/", sTmpDir);
|
||||
TestUtils.copyResourceDir(DecodeKotlinTest.class, "brut/apktool/decode/testkotlin/", sTmpDir);
|
||||
|
||||
String apk = "testkotlin.apk";
|
||||
|
||||
|
@ -43,7 +43,7 @@ public class DoubleExtensionUnknownFileTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(DoubleExtensionUnknownFileTest.class, "brut/apktool/issue1244/", sTmpDir);
|
||||
TestUtils.copyResourceDir(DoubleExtensionUnknownFileTest.class, "brut/apktool/decode/issue1244/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -42,7 +42,7 @@ public class ExternalEntityTest extends BaseTest {
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
sTestOrigDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(ExternalEntityTest.class, "brut/apktool/doctype/", sTestOrigDir);
|
||||
TestUtils.copyResourceDir(ExternalEntityTest.class, "brut/apktool/decode/doctype/", sTestOrigDir);
|
||||
|
||||
LOGGER.info("Building doctype.apk...");
|
||||
File testApk = new File(sTestOrigDir, "doctype.apk");
|
||||
|
@ -48,7 +48,7 @@ public class ForceManifestDecodeNoResourcesTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(ForceManifestDecodeNoResourcesTest.class, "brut/apktool/issue1680/", sTmpDir);
|
||||
TestUtils.copyResourceDir(ForceManifestDecodeNoResourcesTest.class, "brut/apktool/decode/issue1680/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -42,7 +42,7 @@ public class MinifiedArscTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(MinifiedArscTest.class, "brut/apktool/issue1157/", sTmpDir);
|
||||
TestUtils.copyResourceDir(MinifiedArscTest.class, "brut/apktool/decode/issue1157/", sTmpDir);
|
||||
|
||||
String apk = "issue1157.apk";
|
||||
sTestNewDir = new ExtFile(sTmpDir, "issue1157");
|
||||
|
@ -42,7 +42,7 @@ public class MissingVersionManifestTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(MissingVersionManifestTest.class, "brut/apktool/issue1264/", sTmpDir);
|
||||
TestUtils.copyResourceDir(MissingVersionManifestTest.class, "brut/apktool/decode/issue1264/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -40,7 +40,7 @@ public class OutsideOfDirectoryEntryTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(OutsideOfDirectoryEntryTest.class, "brut/apktool/issue1589/", sTmpDir);
|
||||
TestUtils.copyResourceDir(OutsideOfDirectoryEntryTest.class, "brut/apktool/decode/issue1589/", sTmpDir);
|
||||
|
||||
String apk = "issue1589.apk";
|
||||
|
||||
|
@ -35,7 +35,7 @@ public class ParentDirectoryTraversalTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(ParentDirectoryTraversalTest.class, "brut/apktool/issue1498/", sTmpDir);
|
||||
TestUtils.copyResourceDir(ParentDirectoryTraversalTest.class, "brut/apktool/decode/issue1498/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -37,7 +37,7 @@ public class VectorDrawableTest extends BaseTest {
|
||||
public static void beforeClass() throws Exception {
|
||||
TestUtils.cleanFrameworkFile();
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(VectorDrawableTest.class, "brut/apktool/issue1456/", sTmpDir);
|
||||
TestUtils.copyResourceDir(VectorDrawableTest.class, "brut/apktool/decode/issue1456/", sTmpDir);
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
|
@ -43,7 +43,7 @@ public class UnknownDirectoryTraversalTest extends BaseTest {
|
||||
@BeforeClass
|
||||
public static void beforeClass() throws Exception {
|
||||
sTmpDir = new ExtFile(OS.createTempDirectory());
|
||||
TestUtils.copyResourceDir(UnknownDirectoryTraversalTest.class, "brut/apktool/traversal", sTmpDir);
|
||||
TestUtils.copyResourceDir(UnknownDirectoryTraversalTest.class, "brut/apktool/util/traversal", sTmpDir);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 5.1 KiB After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 265 B |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 179 B After Width: | Height: | Size: 179 B |
Before Width: | Height: | Size: 327 B After Width: | Height: | Size: 327 B |
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.2 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |