summaryrefslogtreecommitdiffstats
path: root/run-libcore-tests
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2011-06-01 10:12:44 -0700
committerElliott Hughes <enh@google.com>2011-06-01 10:27:02 -0700
commit555c4728b8fdfd96590c218491f15b88712704dc (patch)
tree6a41913e6e77704c824479f76f24b413ecd79037 /run-libcore-tests
parent4596cf129099ade7ec2ec17543d68db03d2f45bd (diff)
downloadlibcore-555c4728b8fdfd96590c218491f15b88712704dc.zip
libcore-555c4728b8fdfd96590c218491f15b88712704dc.tar.gz
libcore-555c4728b8fdfd96590c218491f15b88712704dc.tar.bz2
Allow the user to specify the packages to test.
Change-Id: Ifa550bccf0cedfa3fa21805f9e862aa9f6f4447b
Diffstat (limited to 'run-libcore-tests')
-rwxr-xr-xrun-libcore-tests13
1 files changed, 8 insertions, 5 deletions
diff --git a/run-libcore-tests b/run-libcore-tests
index a1a66ae..79c4d07 100755
--- a/run-libcore-tests
+++ b/run-libcore-tests
@@ -3,22 +3,25 @@
# make sure there's a vogar on the path, but prefer the user's one.
export PATH=$PATH:~dalvik-prebuild/vogar/bin
-VOGAR="vogar $VOGAR_FLAGS $*"
+VOGAR="vogar $VOGAR_FLAGS"
# We enumerate the test packages for vogar rather than just giving it the classes.jar
# so hundreds of packages can be tested in parallel, rather than one big jar file serially.
-all_test_packages=$(find libcore/*/src/test -name "*.java" | \
+all_test_packages=$(find `dirname $0`/*/src/test -name "*.java" | \
fgrep -v junit | \
fgrep -v org/w3c/domts | \
xargs grep -h '^package ' | sed 's/^package //' | sed 's/;$//' | sort | uniq | tr "\n" " ")
+all_test_packages="$all_test_packages tests.api.org.w3c.dom"
+
+# Use the list of packages supplied on the command-line, if any.
+test_packages=${*:-$all_test_packages}
echo "Running tests for following test packages:"
-echo $all_test_packages | tr " " "\n"
+echo $test_packages | tr " " "\n"
$VOGAR \
--vm-arg -Xmx32M \
--classpath out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar \
--classpath out/target/common/obj/JAVA_LIBRARIES/sqlite-jdbc_intermediates/classes.jar \
- $all_test_packages \
- tests.api.org.w3c.dom \
+ $test_packages \
|| true