aapt2: move test resources to math structure of tests

This commit is contained in:
Connor Tumbleson 2018-03-05 11:00:46 -05:00
parent a693f316e0
commit 1713495ea7
151 changed files with 25 additions and 25 deletions

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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");

View File

@ -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();

View File

@ -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");

View File

@ -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");

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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();

View File

@ -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

View File

@ -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";

View File

@ -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

View File

@ -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");

View File

@ -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

View File

@ -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");

View File

@ -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

View File

@ -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";

View File

@ -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

View File

@ -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

View File

@ -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

Some files were not shown because too many files have changed in this diff Show More