Nicolas Geoffray | b2e7e24 | 2014-11-28 14:24:28 +0000 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | # |
| 3 | # Copyright (C) 2014 The Android Open Source Project |
| 4 | # |
| 5 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | # you may not use this file except in compliance with the License. |
| 7 | # You may obtain a copy of the License at |
| 8 | # |
| 9 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | # |
| 11 | # Unless required by applicable law or agreed to in writing, software |
| 12 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | # See the License for the specific language governing permissions and |
| 15 | # limitations under the License. |
| 16 | |
| 17 | if [ ! -d libcore ]; then |
| 18 | echo "Script needs to be run at the root of the android tree" |
| 19 | exit 1 |
| 20 | fi |
| 21 | |
Wojciech Staszkiewicz | 08cf148 | 2015-05-21 17:31:38 +0100 | [diff] [blame] | 22 | # Jar containing jsr166 tests. |
| 23 | jsr166_test_jar=out/target/common/obj/JAVA_LIBRARIES/jsr166-tests_intermediates/javalib.jar |
| 24 | |
Sergio Giro | a04ece3 | 2015-06-12 12:35:51 +0100 | [diff] [blame] | 25 | # Jar containing conscrypt tests. |
| 26 | conscrypt_test_jar=out/target/common/obj/JAVA_LIBRARIES/conscrypt-tests_intermediates/javalib.jar |
| 27 | |
Wojciech Staszkiewicz | 08cf148 | 2015-05-21 17:31:38 +0100 | [diff] [blame] | 28 | # Jar containing all the other tests. |
Nicolas Geoffray | b2e7e24 | 2014-11-28 14:24:28 +0000 | [diff] [blame] | 29 | test_jar=out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar |
| 30 | |
Wojciech Staszkiewicz | 08cf148 | 2015-05-21 17:31:38 +0100 | [diff] [blame] | 31 | |
Nicolas Geoffray | b2e7e24 | 2014-11-28 14:24:28 +0000 | [diff] [blame] | 32 | if [ ! -f $test_jar ]; then |
Wojciech Staszkiewicz | 08cf148 | 2015-05-21 17:31:38 +0100 | [diff] [blame] | 33 | echo "Before running, you must build core-tests, jsr166-tests and vogar: \ |
| 34 | make core-tests jsr166-tests vogar vogar.jar" |
Nicolas Geoffray | b2e7e24 | 2014-11-28 14:24:28 +0000 | [diff] [blame] | 35 | exit 1 |
| 36 | fi |
| 37 | |
Nicolas Geoffray | c3837e4 | 2014-12-03 11:30:26 +0000 | [diff] [blame] | 38 | # Packages that currently work correctly with the expectation files. |
Sergio Giro | a04ece3 | 2015-06-12 12:35:51 +0100 | [diff] [blame] | 39 | working_packages=("com.android.org.conscrypt" |
| 40 | "dalvik.system" |
Brian Carlstrom | 4c78ffa | 2015-06-11 07:33:51 -0700 | [diff] [blame] | 41 | "libcore.icu" |
David Brazdil | 598b220 | 2015-02-24 10:12:06 +0000 | [diff] [blame] | 42 | "libcore.io" |
| 43 | "libcore.java.lang" |
Nicolas Geoffray | c3837e4 | 2014-12-03 11:30:26 +0000 | [diff] [blame] | 44 | "libcore.java.math" |
Sergio Giro | a04ece3 | 2015-06-12 12:35:51 +0100 | [diff] [blame] | 45 | "libcore.java.security" |
David Brazdil | 598b220 | 2015-02-24 10:12:06 +0000 | [diff] [blame] | 46 | "libcore.java.text" |
Nicolas Geoffray | 3cdf818 | 2014-12-01 10:12:15 +0000 | [diff] [blame] | 47 | "libcore.java.util" |
David Brazdil | 4cd7dfd | 2015-02-24 13:33:01 +0000 | [diff] [blame] | 48 | "libcore.javax.crypto" |
Sergio Giro | a04ece3 | 2015-06-12 12:35:51 +0100 | [diff] [blame] | 49 | "libcore.javax.net" |
David Brazdil | 598b220 | 2015-02-24 10:12:06 +0000 | [diff] [blame] | 50 | "libcore.javax.security" |
| 51 | "libcore.javax.sql" |
| 52 | "libcore.javax.xml" |
| 53 | "libcore.net" |
| 54 | "libcore.reflect" |
| 55 | "libcore.util" |
Nicolas Geoffray | 3cdf818 | 2014-12-01 10:12:15 +0000 | [diff] [blame] | 56 | "org.apache.harmony.annotation" |
David Brazdil | 4cd7dfd | 2015-02-24 13:33:01 +0000 | [diff] [blame] | 57 | "org.apache.harmony.crypto" |
David Brazdil | e2f28ad | 2015-02-24 10:44:29 +0000 | [diff] [blame] | 58 | "org.apache.harmony.luni" |
| 59 | "org.apache.harmony.nio" |
Nicolas Geoffray | 3cdf818 | 2014-12-01 10:12:15 +0000 | [diff] [blame] | 60 | "org.apache.harmony.regex" |
David Brazdil | e2f28ad | 2015-02-24 10:44:29 +0000 | [diff] [blame] | 61 | "org.apache.harmony.security" |
| 62 | "org.apache.harmony.testframework" |
| 63 | "org.apache.harmony.tests.java.io" |
Nicolas Geoffray | 3cdf818 | 2014-12-01 10:12:15 +0000 | [diff] [blame] | 64 | "org.apache.harmony.tests.java.lang" |
Nicolas Geoffray | c3837e4 | 2014-12-03 11:30:26 +0000 | [diff] [blame] | 65 | "org.apache.harmony.tests.java.math" |
Nicolas Geoffray | 3cdf818 | 2014-12-01 10:12:15 +0000 | [diff] [blame] | 66 | "org.apache.harmony.tests.java.util" |
David Brazdil | e2f28ad | 2015-02-24 10:44:29 +0000 | [diff] [blame] | 67 | "org.apache.harmony.tests.java.text" |
| 68 | "org.apache.harmony.tests.javax.security" |
Wojciech Staszkiewicz | 08cf148 | 2015-05-21 17:31:38 +0100 | [diff] [blame] | 69 | "tests.java.lang.String" |
| 70 | "jsr166") |
Nicolas Geoffray | b2e7e24 | 2014-11-28 14:24:28 +0000 | [diff] [blame] | 71 | |
| 72 | # Run the tests using vogar. |
Nicolas Geoffray | 3cdf818 | 2014-12-01 10:12:15 +0000 | [diff] [blame] | 73 | echo "Running tests for the following test packages:" |
| 74 | echo ${working_packages[@]} | tr " " "\n" |
Sergio Giro | a04ece3 | 2015-06-12 12:35:51 +0100 | [diff] [blame] | 75 | vogar $@ --expectations art/tools/libcore_failures.txt --classpath $conscrypt_test_jar --classpath $jsr166_test_jar --classpath $test_jar ${working_packages[@]} |