diff options
author | Jean-Marie Henaff <jmhenaff@google.com> | 2015-01-22 15:21:37 +0100 |
---|---|---|
committer | Jean-Marie Henaff <jmhenaff@google.com> | 2015-01-22 17:21:38 +0100 |
commit | 5496a61b74bf35fa84c9db99720ff7efcb6c7434 (patch) | |
tree | 67945801cf057ab3aff3918d37bc789184717b52 | |
parent | cd863a933481d8cebd5ea34872af72e91230364c (diff) | |
download | toolchain_jill-5496a61b74bf35fa84c9db99720ff7efcb6c7434.zip toolchain_jill-5496a61b74bf35fa84c9db99720ff7efcb6c7434.tar.gz toolchain_jill-5496a61b74bf35fa84c9db99720ff7efcb6c7434.tar.bz2 |
Move test location lookup to jack project
this CL adapts Jill to change 124242
Change-Id: If717de71690d4bfaf513e834f190728c83d8d329
-rw-r--r-- | jill/tests/com/android/jill/Core.java | 6 | ||||
-rw-r--r-- | jill/tests/com/android/jill/JillTestTools.java | 13 |
2 files changed, 12 insertions, 7 deletions
diff --git a/jill/tests/com/android/jill/Core.java b/jill/tests/com/android/jill/Core.java index fcc77c1..5325f5e 100644 --- a/jill/tests/com/android/jill/Core.java +++ b/jill/tests/com/android/jill/Core.java @@ -16,6 +16,8 @@ package com.android.jill; +import com.android.jack.test.TestsProperties; + import org.junit.BeforeClass; import org.junit.Test; @@ -32,7 +34,7 @@ public class Core { @Test public void coreToJayceFromJar() throws Exception { Options options = new Options(); - options.setBinaryFile(new File(JillTestTools.getAndroidTop() + options.setBinaryFile(new File(TestsProperties.getAndroidRootDir().getPath() + "/out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes.jar")); options.setVerbose(true); options.container = ContainerType.DIR; @@ -43,7 +45,7 @@ public class Core { @Test public void coreToJayceFromFolder() throws Exception { Options options = new Options(); - options.setBinaryFile(new File(JillTestTools.getAndroidTop() + options.setBinaryFile(new File(TestsProperties.getAndroidRootDir().getPath() + "/out/target/common/obj/JAVA_LIBRARIES/core_intermediates/classes/")); options.setVerbose(true); options.container = ContainerType.DIR; diff --git a/jill/tests/com/android/jill/JillTestTools.java b/jill/tests/com/android/jill/JillTestTools.java index 909579a..5b366a3 100644 --- a/jill/tests/com/android/jill/JillTestTools.java +++ b/jill/tests/com/android/jill/JillTestTools.java @@ -21,6 +21,7 @@ import com.android.jack.JarJarRules; import com.android.jack.ProguardFlags; import com.android.jack.TestTools; import com.android.jack.backend.dex.DexFileWriter; +import com.android.jack.test.TestsProperties; import java.io.File; import java.io.IOException; @@ -33,17 +34,20 @@ import javax.annotation.Nonnull; public class JillTestTools extends TestTools { @Nonnull - private static final String JILL_UNIT_TESTS_PATH = "toolchain/jill/jill/tests/"; + private static final String JILL_UNIT_TESTS_PATH = "jill/tests/"; @Nonnull private static final String JILL_PACKAGE = "com/android/jill/"; @Nonnull - private static final File JILL = getFromAndroidTree("out/host/linux-x86/framework/jill.jar"); + private static final File JILL_DIR = new File(TestsProperties.getJackRootDir(), "../jill"); + + @Nonnull + private static final File JILL = new File(JILL_DIR, "dist/jill.jar"); @Nonnull public static File getJillTestFolder(@Nonnull String testName) { - return getFromAndroidTree(JILL_UNIT_TESTS_PATH + JILL_PACKAGE + testName); + return new File(JILL_DIR, JILL_UNIT_TESTS_PATH + JILL_PACKAGE + testName); } public static void runJill(@Nonnull File inputFile, @Nonnull File outputFile) throws Exception { @@ -59,8 +63,7 @@ public class JillTestTools extends TestTools { public static void runJillToZip(@Nonnull File inputFile, @Nonnull File outputFile) throws Exception { String[] args = new String[] {"--output", outputFile.getAbsolutePath(), - inputFile.getAbsolutePath(), - "-v"}; + inputFile.getAbsolutePath()}; Options options = Main.getOptions(args); new Jill(options, "").process(options.getBinaryFile()); } |