blob: 03016facb2557fff010f6d6022de838e36004688 [file] [log] [blame]
Nicolas Geoffrayb2e7e242014-11-28 14:24:28 +00001#!/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
17if [ ! -d libcore ]; then
18 echo "Script needs to be run at the root of the android tree"
19 exit 1
20fi
21
Wojciech Staszkiewicz08cf1482015-05-21 17:31:38 +010022# Jar containing jsr166 tests.
23jsr166_test_jar=out/target/common/obj/JAVA_LIBRARIES/jsr166-tests_intermediates/javalib.jar
24
Sergio Giroa04ece32015-06-12 12:35:51 +010025# Jar containing conscrypt tests.
26conscrypt_test_jar=out/target/common/obj/JAVA_LIBRARIES/conscrypt-tests_intermediates/javalib.jar
27
Wojciech Staszkiewicz08cf1482015-05-21 17:31:38 +010028# Jar containing all the other tests.
Nicolas Geoffrayb2e7e242014-11-28 14:24:28 +000029test_jar=out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar
30
Wojciech Staszkiewicz08cf1482015-05-21 17:31:38 +010031
Nicolas Geoffrayb2e7e242014-11-28 14:24:28 +000032if [ ! -f $test_jar ]; then
Wojciech Staszkiewicz08cf1482015-05-21 17:31:38 +010033 echo "Before running, you must build core-tests, jsr166-tests and vogar: \
34 make core-tests jsr166-tests vogar vogar.jar"
Nicolas Geoffrayb2e7e242014-11-28 14:24:28 +000035 exit 1
36fi
37
Nicolas Geoffrayc3837e42014-12-03 11:30:26 +000038# Packages that currently work correctly with the expectation files.
Sergio Giroa04ece32015-06-12 12:35:51 +010039working_packages=("com.android.org.conscrypt"
40 "dalvik.system"
Brian Carlstrom4c78ffa2015-06-11 07:33:51 -070041 "libcore.icu"
David Brazdil598b2202015-02-24 10:12:06 +000042 "libcore.io"
43 "libcore.java.lang"
Nicolas Geoffrayc3837e42014-12-03 11:30:26 +000044 "libcore.java.math"
Sergio Giroa04ece32015-06-12 12:35:51 +010045 "libcore.java.security"
David Brazdil598b2202015-02-24 10:12:06 +000046 "libcore.java.text"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000047 "libcore.java.util"
David Brazdil4cd7dfd2015-02-24 13:33:01 +000048 "libcore.javax.crypto"
Sergio Giroa04ece32015-06-12 12:35:51 +010049 "libcore.javax.net"
David Brazdil598b2202015-02-24 10:12:06 +000050 "libcore.javax.security"
51 "libcore.javax.sql"
52 "libcore.javax.xml"
53 "libcore.net"
54 "libcore.reflect"
55 "libcore.util"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000056 "org.apache.harmony.annotation"
David Brazdil4cd7dfd2015-02-24 13:33:01 +000057 "org.apache.harmony.crypto"
David Brazdile2f28ad2015-02-24 10:44:29 +000058 "org.apache.harmony.luni"
59 "org.apache.harmony.nio"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000060 "org.apache.harmony.regex"
David Brazdile2f28ad2015-02-24 10:44:29 +000061 "org.apache.harmony.security"
62 "org.apache.harmony.testframework"
63 "org.apache.harmony.tests.java.io"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000064 "org.apache.harmony.tests.java.lang"
Nicolas Geoffrayc3837e42014-12-03 11:30:26 +000065 "org.apache.harmony.tests.java.math"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000066 "org.apache.harmony.tests.java.util"
David Brazdile2f28ad2015-02-24 10:44:29 +000067 "org.apache.harmony.tests.java.text"
68 "org.apache.harmony.tests.javax.security"
Wojciech Staszkiewicz08cf1482015-05-21 17:31:38 +010069 "tests.java.lang.String"
70 "jsr166")
Nicolas Geoffrayb2e7e242014-11-28 14:24:28 +000071
72# Run the tests using vogar.
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000073echo "Running tests for the following test packages:"
74echo ${working_packages[@]} | tr " " "\n"
Sergio Giroa04ece32015-06-12 12:35:51 +010075vogar $@ --expectations art/tools/libcore_failures.txt --classpath $conscrypt_test_jar --classpath $jsr166_test_jar --classpath $test_jar ${working_packages[@]}