blob: 344d2dedb3f9cb4988e1daf8c4b49de08ad15be3 [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
25# Jar containing all the other tests.
Nicolas Geoffrayb2e7e242014-11-28 14:24:28 +000026test_jar=out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar
27
Wojciech Staszkiewicz08cf1482015-05-21 17:31:38 +010028
Nicolas Geoffrayb2e7e242014-11-28 14:24:28 +000029if [ ! -f $test_jar ]; then
Wojciech Staszkiewicz08cf1482015-05-21 17:31:38 +010030 echo "Before running, you must build core-tests, jsr166-tests and vogar: \
31 make core-tests jsr166-tests vogar vogar.jar"
Nicolas Geoffrayb2e7e242014-11-28 14:24:28 +000032 exit 1
33fi
34
Nicolas Geoffrayc3837e42014-12-03 11:30:26 +000035# Packages that currently work correctly with the expectation files.
Sergio Giro688e1b62015-06-11 16:00:11 +000036working_packages=("libcore.icu"
David Brazdil598b2202015-02-24 10:12:06 +000037 "libcore.io"
38 "libcore.java.lang"
Nicolas Geoffrayc3837e42014-12-03 11:30:26 +000039 "libcore.java.math"
David Brazdil598b2202015-02-24 10:12:06 +000040 "libcore.java.text"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000041 "libcore.java.util"
David Brazdil4cd7dfd2015-02-24 13:33:01 +000042 "libcore.javax.crypto"
David Brazdil598b2202015-02-24 10:12:06 +000043 "libcore.javax.security"
44 "libcore.javax.sql"
45 "libcore.javax.xml"
46 "libcore.net"
47 "libcore.reflect"
48 "libcore.util"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000049 "org.apache.harmony.annotation"
David Brazdil4cd7dfd2015-02-24 13:33:01 +000050 "org.apache.harmony.crypto"
David Brazdile2f28ad2015-02-24 10:44:29 +000051 "org.apache.harmony.luni"
52 "org.apache.harmony.nio"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000053 "org.apache.harmony.regex"
David Brazdile2f28ad2015-02-24 10:44:29 +000054 "org.apache.harmony.security"
55 "org.apache.harmony.testframework"
56 "org.apache.harmony.tests.java.io"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000057 "org.apache.harmony.tests.java.lang"
Nicolas Geoffrayc3837e42014-12-03 11:30:26 +000058 "org.apache.harmony.tests.java.math"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000059 "org.apache.harmony.tests.java.util"
David Brazdile2f28ad2015-02-24 10:44:29 +000060 "org.apache.harmony.tests.java.text"
61 "org.apache.harmony.tests.javax.security"
Wojciech Staszkiewicz08cf1482015-05-21 17:31:38 +010062 "tests.java.lang.String"
63 "jsr166")
Nicolas Geoffrayb2e7e242014-11-28 14:24:28 +000064
65# Run the tests using vogar.
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000066echo "Running tests for the following test packages:"
67echo ${working_packages[@]} | tr " " "\n"
Sergio Giro688e1b62015-06-11 16:00:11 +000068vogar $@ --expectations art/tools/libcore_failures.txt --classpath $jsr166_test_jar --classpath $test_jar ${working_packages[@]}