• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/bash
2
3# Make sure there's a vogar on the path, but prefer the user's one.
4export PATH=$PATH:~dalvik-prebuild/vogar/bin
5
6VOGAR="vogar $VOGAR_FLAGS"
7
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.
10all_test_packages=$(find `dirname $0`/*/src/test -name "*.java" | \
11  fgrep -v junit | \
12  fgrep -v org/w3c/domts | \
13  xargs grep -h '^package ' | sed 's/^package //' | sed 's/;$//' | sort | uniq | tr "\n" " ")
14all_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}
18
19echo "Running tests for following test packages:"
20echo $test_packages | tr " " "\n"
21
22$VOGAR \
23  --vm-arg -Xmx32M \
24  --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 \
28  $test_packages \
29  || true
30