blob: 9fa3fda6515705cd17fa00cf054b9eb00692b6b5 [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
22# Jar containing all the tests.
23test_jar=out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar
24
25if [ ! -f $test_jar ]; then
26 echo "Before running, you must build core-tests and vogar: make core-tests vogar vogar.jar"
27 exit 1
28fi
29
Nicolas Geoffrayc3837e42014-12-03 11:30:26 +000030# Packages that currently work correctly with the expectation files.
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000031working_packages=("libcore.java.lang"
Nicolas Geoffrayc3837e42014-12-03 11:30:26 +000032 "libcore.java.math"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000033 "libcore.java.util"
34 "org.apache.harmony.annotation"
35 "org.apache.harmony.regex"
36 "org.apache.harmony.tests.java.lang"
Nicolas Geoffrayc3837e42014-12-03 11:30:26 +000037 "org.apache.harmony.tests.java.math"
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000038 "org.apache.harmony.tests.java.util"
39 "tests.java.lang.String")
Nicolas Geoffrayb2e7e242014-11-28 14:24:28 +000040
41# Run the tests using vogar.
Nicolas Geoffray3cdf8182014-12-01 10:12:15 +000042echo "Running tests for the following test packages:"
43echo ${working_packages[@]} | tr " " "\n"
Nicolas Geoffrayc3837e42014-12-03 11:30:26 +000044vogar $@ --expectations art/tools/libcore_failures.txt --classpath $test_jar ${working_packages[@]}