blob: 996030acbe83b2189b7bbeca1b2fcd3215721c71 [file] [log] [blame]
Elliott Hughes94e96092011-05-20 14:46:09 -07001#!/bin/bash
2
Narayan Kamath388f08a2015-12-24 10:36:48 +00003# Make sure there's a vogar on the path, but prefer the user's one.
Elliott Hughes94e96092011-05-20 14:46:09 -07004export PATH=$PATH:~dalvik-prebuild/vogar/bin
5
Elliott Hughes555c4722011-06-01 10:12:44 -07006VOGAR="vogar $VOGAR_FLAGS"
Elliott Hughes94e96092011-05-20 14:46:09 -07007
8# We enumerate the test packages for vogar rather than just giving it the classes.jar
9# so hundreds of packages can be tested in parallel, rather than one big jar file serially.
Elliott Hughes555c4722011-06-01 10:12:44 -070010all_test_packages=$(find `dirname $0`/*/src/test -name "*.java" | \
Elliott Hughes94e96092011-05-20 14:46:09 -070011 fgrep -v junit | \
12 fgrep -v org/w3c/domts | \
13 xargs grep -h '^package ' | sed 's/^package //' | sed 's/;$//' | sort | uniq | tr "\n" " ")
Elliott Hughes555c4722011-06-01 10:12:44 -070014all_test_packages="$all_test_packages tests.api.org.w3c.dom"
15
16# Use the list of packages supplied on the command-line, if any.
17test_packages=${*:-$all_test_packages}
Elliott Hughes94e96092011-05-20 14:46:09 -070018
19echo "Running tests for following test packages:"
Elliott Hughes555c4722011-06-01 10:12:44 -070020echo $test_packages | tr " " "\n"
Elliott Hughes94e96092011-05-20 14:46:09 -070021
22$VOGAR \
23 --vm-arg -Xmx32M \
Joachim Sauer3564c182016-04-05 15:13:39 +010024 --classpath out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/classes.jack \
25 --classpath out/target/common/obj/JAVA_LIBRARIES/sqlite-jdbc_intermediates/classes.jack \
26 --classpath out/target/common/obj/JAVA_LIBRARIES/bouncycastle_intermediates/classes.jack \
27 --classpath out/target/common/obj/JAVA_LIBRARIES/okhttp_intermediates/classes.jack \
Elliott Hughes555c4722011-06-01 10:12:44 -070028 $test_packages \
Elliott Hughes94e96092011-05-20 14:46:09 -070029 || true