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 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 30# Packages that currently work correctly with the expectation files. 31working_packages=("libcore.icu" 32 "libcore.io" 33 "libcore.java.lang" 34 "libcore.java.math" 35 "libcore.java.text" 36 "libcore.java.util" 37 "libcore.javax.crypto" 38 "libcore.javax.security" 39 "libcore.javax.sql" 40 "libcore.javax.xml" 41 "libcore.net" 42 "libcore.reflect" 43 "libcore.util" 44 "org.apache.harmony.annotation" 45 "org.apache.harmony.crypto" 46 "org.apache.harmony.luni" 47 "org.apache.harmony.nio" 48 "org.apache.harmony.regex" 49 "org.apache.harmony.security" 50 "org.apache.harmony.testframework" 51 "org.apache.harmony.tests.java.io" 52 "org.apache.harmony.tests.java.lang" 53 "org.apache.harmony.tests.java.math" 54 "org.apache.harmony.tests.java.util" 55 "org.apache.harmony.tests.java.text" 56 "org.apache.harmony.tests.javax.security" 57 "tests.java.lang.String") 58 59# Run the tests using vogar. 60echo "Running tests for the following test packages:" 61echo ${working_packages[@]} | tr " " "\n" 62vogar $@ --expectations art/tools/libcore_failures.txt --classpath $test_jar ${working_packages[@]} 63