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 | |
| 22 | # Jar containing all the tests. |
| 23 | test_jar=out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar |
| 24 | |
| 25 | if [ ! -f $test_jar ]; then |
| 26 | echo "Before running, you must build core-tests and vogar: make core-tests vogar vogar.jar" |
| 27 | exit 1 |
| 28 | fi |
| 29 | |
Nicolas Geoffray | c3837e4 | 2014-12-03 11:30:26 +0000 | [diff] [blame] | 30 | # Packages that currently work correctly with the expectation files. |
Nicolas Geoffray | 3cdf818 | 2014-12-01 10:12:15 +0000 | [diff] [blame] | 31 | working_packages=("libcore.java.lang" |
Nicolas Geoffray | c3837e4 | 2014-12-03 11:30:26 +0000 | [diff] [blame] | 32 | "libcore.java.math" |
Nicolas Geoffray | 3cdf818 | 2014-12-01 10:12:15 +0000 | [diff] [blame] | 33 | "libcore.java.util" |
| 34 | "org.apache.harmony.annotation" |
| 35 | "org.apache.harmony.regex" |
| 36 | "org.apache.harmony.tests.java.lang" |
Nicolas Geoffray | c3837e4 | 2014-12-03 11:30:26 +0000 | [diff] [blame] | 37 | "org.apache.harmony.tests.java.math" |
Nicolas Geoffray | 3cdf818 | 2014-12-01 10:12:15 +0000 | [diff] [blame] | 38 | "org.apache.harmony.tests.java.util" |
| 39 | "tests.java.lang.String") |
Nicolas Geoffray | b2e7e24 | 2014-11-28 14:24:28 +0000 | [diff] [blame] | 40 | |
| 41 | # Run the tests using vogar. |
Nicolas Geoffray | 3cdf818 | 2014-12-01 10:12:15 +0000 | [diff] [blame] | 42 | echo "Running tests for the following test packages:" |
| 43 | echo ${working_packages[@]} | tr " " "\n" |
Nicolas Geoffray | c3837e4 | 2014-12-03 11:30:26 +0000 | [diff] [blame] | 44 | vogar $@ --expectations art/tools/libcore_failures.txt --classpath $test_jar ${working_packages[@]} |