diff options
Diffstat (limited to 'jack-tests/tests/com/android/jack/compile/androidtree')
9 files changed, 583 insertions, 0 deletions
diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/AllTests.java b/jack-tests/tests/com/android/jack/compile/androidtree/AllTests.java new file mode 100644 index 0000000..ec3bacc --- /dev/null +++ b/jack-tests/tests/com/android/jack/compile/androidtree/AllTests.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.android.jack.compile.androidtree; + +import com.android.jack.compile.androidtree.bouncycastle.BouncycastleCompilationTest; +import com.android.jack.compile.androidtree.core.CoreCompilationTest; +import com.android.jack.compile.androidtree.ext.ExtCompilationTest; +import com.android.jack.compile.androidtree.frameworks.FrameworksBaseCompilationTest; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses(value = {FrameworksBaseCompilationTest.class, CoreCompilationTest.class, + BouncycastleCompilationTest.class, ExtCompilationTest.class}) +public class AllTests { +}
\ No newline at end of file diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/bouncycastle/BouncycastleCompilationTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/bouncycastle/BouncycastleCompilationTest.java new file mode 100644 index 0000000..3768888 --- /dev/null +++ b/jack-tests/tests/com/android/jack/compile/androidtree/bouncycastle/BouncycastleCompilationTest.java @@ -0,0 +1,91 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.jack.compile.androidtree.bouncycastle; + +import com.android.jack.JarJarRules; +import com.android.jack.TestTools; +import com.android.jack.category.RedundantTests; +import com.android.jack.category.SlowTests; +import com.android.jack.test.comparator.ComparatorDex; +import com.android.jack.test.helper.CheckDexStructureTestHelper; +import com.android.jack.test.helper.SourceToDexComparisonTestHelper; +import com.android.jack.test.toolchain.AbstractTestTools; +import com.android.jack.test.toolchain.AndroidToolchain; + +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import java.io.File; + +@Ignore("Tree") +public class BouncycastleCompilationTest { + + private static File[] CLASSPATH; + private static File[] REF_CLASSPATH; + + private static File SOURCELIST; + + private static JarJarRules JARJAR_RULES; + + @BeforeClass + public static void setUpClass() { + BouncycastleCompilationTest.class.getClassLoader().setDefaultAssertionStatus(true); + CLASSPATH = new File[] { + TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack") + }; + REF_CLASSPATH = new File[] { + TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jar") + }; + SOURCELIST = TestTools.getTargetLibSourcelist("bouncycastle"); + JARJAR_RULES = new JarJarRules( + TestTools.getFromAndroidTree("external/bouncycastle/jarjar-rules.txt")); + } + + @Test + @Category(RedundantTests.class) + public void compileBouncycastle() throws Exception { + File outDexFolder = AbstractTestTools.createTempDir(); + AndroidToolchain toolchain = AbstractTestTools.getCandidateToolchain(AndroidToolchain.class); + toolchain.disableDxOptimizations(); + toolchain.srcToExe( + AbstractTestTools.getClasspathAsString(CLASSPATH), + outDexFolder, + /* zipFile = */ false, + SOURCELIST); + } + + @Test + @Category(SlowTests.class) + public void compareBouncycastleStructure() throws Exception { + SourceToDexComparisonTestHelper helper = new CheckDexStructureTestHelper(SOURCELIST); + // TODO(jmhenaff): use setBootclasspath + helper.setCandidateClasspath(CLASSPATH); + helper.setReferenceClasspath(REF_CLASSPATH); + helper.setJarjarRulesFile(JARJAR_RULES); + + ComparatorDex comparator = helper.createDexFileComparator(); + comparator.setCompareDebugInfoBinary(false); + comparator.setCompareInstructionNumber(true); + comparator.setInstructionNumberTolerance(0.4f); + + helper.runTest(comparator); + } +} diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/core/CoreCompilationTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/core/CoreCompilationTest.java new file mode 100644 index 0000000..8d3631d --- /dev/null +++ b/jack-tests/tests/com/android/jack/compile/androidtree/core/CoreCompilationTest.java @@ -0,0 +1,116 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.jack.compile.androidtree.core; + +import com.android.jack.DexAnnotationsComparator; +import com.android.jack.DexComparator; +import com.android.jack.Options; +import com.android.jack.TestTools; +import com.android.jack.backend.dex.DexFileWriter; +import com.android.jack.category.RedundantTests; +import com.android.jack.category.SlowTests; +import com.android.jack.config.id.JavaVersionPropertyId.JavaVersion; +import com.android.jack.test.comparator.ComparatorDex; +import com.android.jack.test.helper.CheckDexStructureTestHelper; +import com.android.jack.test.helper.SourceToDexComparisonTestHelper; +import com.android.jack.test.toolchain.AbstractTestTools; +import com.android.jack.test.toolchain.JackBasedToolchain; +import com.android.jack.test.toolchain.Toolchain.SourceLevel; +import com.android.sched.vfs.Container; + +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import java.io.File; + +@Ignore("Tree") +public class CoreCompilationTest { + + private static File SOURCELIST; + + @BeforeClass + public static void setUpClass() { + CoreCompilationTest.class.getClassLoader().setDefaultAssertionStatus(true); + SOURCELIST = TestTools.getTargetLibSourcelist("core-libart"); + } + + @Test + @Category(RedundantTests.class) + public void compileCore() throws Exception { + File outDexFolder = AbstractTestTools.createTempDir(); + JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class); + toolchain.addProperty(Options.JAVA_SOURCE_VERSION.getName(), JavaVersion.JAVA_7.toString()); + toolchain.srcToExe( + AbstractTestTools.getClasspathAsString(toolchain.getDefaultBootClasspath()), + outDexFolder, + /* zipFile = */ false, + SOURCELIST); + } + + @Test + public void compareLibCoreStructure() throws Exception { + SourceToDexComparisonTestHelper helper = new CheckDexStructureTestHelper(SOURCELIST); + helper.setCandidateClasspath(/* empty */); + helper.setReferenceClasspath(/* empty */); + helper.setSourceLevel(SourceLevel.JAVA_7); + + ComparatorDex comparator = helper.createDexFileComparator(); + comparator.setCompareDebugInfoBinary(false); + comparator.setCompareInstructionNumber(false); + comparator.setInstructionNumberTolerance(0.1f); + + helper.runTest(comparator); + } + + @Test + @Category(SlowTests.class) + public void compileCoreWithJackAndDex() throws Exception { + File coreDexFolderFromJava = AbstractTestTools.createTempDir(); + File coreDexFromJava = new File(coreDexFolderFromJava, DexFileWriter.DEX_FILENAME); + + JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class); + toolchain.addProperty(Options.GENERATE_JACK_LIBRARY.getName(), "true"); + + File outputFile = new File("/tmp/jackIncrementalOutput"); + + toolchain.addProperty( + Options.DEX_OUTPUT_CONTAINER_TYPE.getName(), Container.DIR.toString()); + toolchain.addProperty(Options.LIBRARY_OUTPUT_DIR.getName(), outputFile.getAbsolutePath()); + toolchain.addProperty( + Options.LIBRARY_OUTPUT_CONTAINER_TYPE.getName(), Container.DIR.toString()); + toolchain.setSourceLevel(SourceLevel.JAVA_7); + + toolchain.srcToExe( + /* classpath = */ null, + coreDexFolderFromJava, + /* zipFile = */ false, + SOURCELIST); + + File coreDexFolderFromJack = AbstractTestTools.createTempDir(); + File coreDexFromJack = new File(coreDexFolderFromJack, DexFileWriter.DEX_FILENAME); + toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class); + toolchain.libToExe(outputFile, coreDexFolderFromJack, /* zipFile = */ false); + + // Compare dex files structures and number of instructions + new DexComparator(false /* withDebugInfo */, false /* strict */, + false /* compareDebugInfoBinary */, true /* compareInstructionNumber */, 0).compare( + coreDexFromJava, coreDexFromJack); + new DexAnnotationsComparator().compare(coreDexFromJava, coreDexFromJack); + } +} diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/AllTests.java b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/AllTests.java new file mode 100644 index 0000000..dab444a --- /dev/null +++ b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/AllTests.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.jack.compile.androidtree.dalvik; + + +import com.android.jack.compile.androidtree.dalvik.compilerregressions.CompilerRegressionsTest; +import com.android.jack.compile.androidtree.dalvik.finalizer.FinalizerTest; +import com.android.jack.compile.androidtree.dalvik.omnibus.OmnibusCompilationTest; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses(value = {CompilerRegressionsTest.class, + FinalizerTest.class, + OmnibusCompilationTest.class}) +public class AllTests { +} diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/compilerregressions/CompilerRegressionsTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/compilerregressions/CompilerRegressionsTest.java new file mode 100644 index 0000000..ab98c40 --- /dev/null +++ b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/compilerregressions/CompilerRegressionsTest.java @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.jack.compile.androidtree.dalvik.compilerregressions; + +import com.android.jack.TestTools; +import com.android.jack.test.toolchain.AbstractTestTools; +import com.android.jack.test.toolchain.AndroidToolchain; + +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +import java.io.File; + +@Ignore("Tree") +public class CompilerRegressionsTest { + + private static File[] BOOTCLASSPATH; + + @BeforeClass + public static void setUpClass() { + CompilerRegressionsTest.class.getClassLoader().setDefaultAssertionStatus(true); + BOOTCLASSPATH = new File[] {TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack")}; + } + + @Test + public void compileRegressions() throws Exception { + AndroidToolchain toolchain = AbstractTestTools.getCandidateToolchain(AndroidToolchain.class); + toolchain.srcToExe( + AbstractTestTools.getClasspathAsString(BOOTCLASSPATH), + AbstractTestTools.createTempFile("out", ".zip"), + /* zipFile = */ true, + TestTools.getArtTestFolder("083-compiler-regressions")); + } +} diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/finalizer/FinalizerTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/finalizer/FinalizerTest.java new file mode 100644 index 0000000..e5d2f45 --- /dev/null +++ b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/finalizer/FinalizerTest.java @@ -0,0 +1,50 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.jack.compile.androidtree.dalvik.finalizer; + +import com.android.jack.TestTools; +import com.android.jack.test.toolchain.AbstractTestTools; +import com.android.jack.test.toolchain.AndroidToolchain; + +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; + +import java.io.File; + +@Ignore("Tree") +public class FinalizerTest { + + private static File[] BOOTCLASSPATH; + + @BeforeClass + public static void setUpClass() { + FinalizerTest.class.getClassLoader().setDefaultAssertionStatus(true); + BOOTCLASSPATH = new File[] {TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack")}; + } + + @Test + public void compileFinalizer() throws Exception { + AndroidToolchain toolchain = AbstractTestTools.getCandidateToolchain(AndroidToolchain.class); + toolchain.srcToExe( + AbstractTestTools.getClasspathAsString(BOOTCLASSPATH), + AbstractTestTools.createTempFile("out", ".zip"), + /* zipFile = */ true, + TestTools.getArtTestFolder("036-finalizer")); + } +} diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/omnibus/OmnibusCompilationTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/omnibus/OmnibusCompilationTest.java new file mode 100644 index 0000000..6164b2d --- /dev/null +++ b/jack-tests/tests/com/android/jack/compile/androidtree/dalvik/omnibus/OmnibusCompilationTest.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.jack.compile.androidtree.dalvik.omnibus; + +import com.android.jack.TestTools; +import com.android.jack.category.SlowTests; +import com.android.jack.test.toolchain.AbstractTestTools; +import com.android.jack.test.toolchain.AndroidToolchain; + +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import java.io.File; + +@Ignore("Tree") +public class OmnibusCompilationTest { + + private static File[] BOOTCLASSPATH; + + @BeforeClass + public static void setUpClass() { + OmnibusCompilationTest.class.getClassLoader().setDefaultAssertionStatus(true); + BOOTCLASSPATH = new File[] {TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack")}; + } + + @Test + @Category(SlowTests.class) + public void compileOmnibus() throws Exception { + AndroidToolchain toolchain = AbstractTestTools.getCandidateToolchain(AndroidToolchain.class); + toolchain.srcToExe( + AbstractTestTools.getClasspathAsString(BOOTCLASSPATH), + AbstractTestTools.createTempFile("out", ".zip"), + /* zipFile = */ true, + TestTools.getArtTestFolder("003-omnibus-opcodes")); + } +} diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/ext/ExtCompilationTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/ext/ExtCompilationTest.java new file mode 100644 index 0000000..55f1e03 --- /dev/null +++ b/jack-tests/tests/com/android/jack/compile/androidtree/ext/ExtCompilationTest.java @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.jack.compile.androidtree.ext; + +import com.android.jack.TestTools; +import com.android.jack.category.RedundantTests; +import com.android.jack.category.SlowTests; +import com.android.jack.test.comparator.ComparatorDex; +import com.android.jack.test.helper.CheckDexStructureTestHelper; +import com.android.jack.test.helper.SourceToDexComparisonTestHelper; +import com.android.jack.test.toolchain.AbstractTestTools; +import com.android.jack.test.toolchain.AndroidToolchain; + +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import java.io.File; + +@Ignore("Tree") +public class ExtCompilationTest { + + private static File[] CLASSPATH; + private static File[] REF_CLASSPATH; + + private static File SOURCELIST; + + @BeforeClass + public static void setUpClass() { + ExtCompilationTest.class.getClassLoader().setDefaultAssertionStatus(true); + CLASSPATH = new File[] { + TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack") + }; + REF_CLASSPATH = new File[] { + TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jar") + }; + SOURCELIST = TestTools.getTargetLibSourcelist("ext"); + } + + @Test + @Category(RedundantTests.class) + public void compileExt() throws Exception { + AndroidToolchain toolchain = AbstractTestTools.getCandidateToolchain(AndroidToolchain.class); + toolchain.srcToExe( + AbstractTestTools.getClasspathAsString(CLASSPATH), + AbstractTestTools.createTempDir(), + /* zipFile = */ false, + SOURCELIST); + } + + @Test + @Category(SlowTests.class) + public void compareExtStructure() throws Exception { + // TODO(jmhenaff): use setBootclasspath + SourceToDexComparisonTestHelper helper = new CheckDexStructureTestHelper(SOURCELIST); + helper.setCandidateClasspath(CLASSPATH); + helper.setReferenceClasspath(REF_CLASSPATH); + + ComparatorDex comparator = helper.createDexFileComparator(); + comparator.setCompareDebugInfoBinary(false); + comparator.setCompareInstructionNumber(true); + comparator.setInstructionNumberTolerance(0.4f); + + helper.runTest(comparator); + } +} diff --git a/jack-tests/tests/com/android/jack/compile/androidtree/frameworks/FrameworksBaseCompilationTest.java b/jack-tests/tests/com/android/jack/compile/androidtree/frameworks/FrameworksBaseCompilationTest.java new file mode 100644 index 0000000..0ba3671 --- /dev/null +++ b/jack-tests/tests/com/android/jack/compile/androidtree/frameworks/FrameworksBaseCompilationTest.java @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.android.jack.compile.androidtree.frameworks; + +import com.android.jack.TestTools; +import com.android.jack.backend.dex.DexFileWriter; +import com.android.jack.category.SlowTests; +import com.android.jack.test.toolchain.AbstractTestTools; +import com.android.jack.test.toolchain.JackBasedToolchain; +import com.android.jack.test.toolchain.Toolchain.SourceLevel; + +import org.junit.BeforeClass; +import org.junit.Ignore; +import org.junit.Test; +import org.junit.experimental.categories.Category; + +import java.io.File; + +@Ignore("Tree") +public class FrameworksBaseCompilationTest { + + private static File[] BOOTCLASSPATH; + + private static File[] CLASSPATH; + + private static File SOURCELIST; + + @BeforeClass + public static void setUpClass() { + FrameworksBaseCompilationTest.class.getClassLoader().setDefaultAssertionStatus(true); + BOOTCLASSPATH = new File[] { + TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/core-libart_intermediates/classes.jack") + }; + CLASSPATH = new File[] { + TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/conscrypt_intermediates/classes.jack"), + TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/classes.jack"), + TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/core-junit_intermediates/classes.jack"), + TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/classes.jack"), + TestTools.getFromAndroidTree( + "out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes.jack")}; + SOURCELIST = TestTools.getTargetLibSourcelist("framework"); + } + + @Test + @Category(SlowTests.class) + public void compileFrameworks() throws Exception { + File outDexFolder = AbstractTestTools.createTempDir(); + JackBasedToolchain toolchain = AbstractTestTools.getCandidateToolchain(JackBasedToolchain.class); + toolchain.setSourceLevel(SourceLevel.JAVA_7); + toolchain.addProperty(DexFileWriter.DEX_WRITING_POLICY.getName(), "multidex"); + toolchain.srcToExe( + AbstractTestTools.getClasspathsAsString(BOOTCLASSPATH, CLASSPATH), + outDexFolder, + /* zipFile = */ false, + SOURCELIST); + } +} |