Elliott Hughes | 94e9609 | 2011-05-20 14:46:09 -0700 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # make sure there's a vogar on the path, but prefer the user's one. |
| 4 | export PATH=$PATH:~dalvik-prebuild/vogar/bin |
| 5 | |
Elliott Hughes | 555c472 | 2011-06-01 10:12:44 -0700 | [diff] [blame] | 6 | VOGAR="vogar $VOGAR_FLAGS" |
Elliott Hughes | 94e9609 | 2011-05-20 14:46:09 -0700 | [diff] [blame] | 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. |
Elliott Hughes | 555c472 | 2011-06-01 10:12:44 -0700 | [diff] [blame] | 10 | all_test_packages=$(find `dirname $0`/*/src/test -name "*.java" | \ |
Elliott Hughes | 94e9609 | 2011-05-20 14:46:09 -0700 | [diff] [blame] | 11 | fgrep -v junit | \ |
| 12 | fgrep -v org/w3c/domts | \ |
| 13 | xargs grep -h '^package ' | sed 's/^package //' | sed 's/;$//' | sort | uniq | tr "\n" " ") |
Elliott Hughes | 555c472 | 2011-06-01 10:12:44 -0700 | [diff] [blame] | 14 | all_test_packages="$all_test_packages tests.api.org.w3c.dom" |
| 15 | |
| 16 | # Use the list of packages supplied on the command-line, if any. |
| 17 | test_packages=${*:-$all_test_packages} |
Elliott Hughes | 94e9609 | 2011-05-20 14:46:09 -0700 | [diff] [blame] | 18 | |
| 19 | echo "Running tests for following test packages:" |
Elliott Hughes | 555c472 | 2011-06-01 10:12:44 -0700 | [diff] [blame] | 20 | echo $test_packages | tr " " "\n" |
Elliott Hughes | 94e9609 | 2011-05-20 14:46:09 -0700 | [diff] [blame] | 21 | |
| 22 | $VOGAR \ |
| 23 | --vm-arg -Xmx32M \ |
| 24 | --classpath out/target/common/obj/JAVA_LIBRARIES/core-tests_intermediates/javalib.jar \ |
| 25 | --classpath out/target/common/obj/JAVA_LIBRARIES/sqlite-jdbc_intermediates/classes.jar \ |
Elliott Hughes | 555c472 | 2011-06-01 10:12:44 -0700 | [diff] [blame] | 26 | $test_packages \ |
Elliott Hughes | 94e9609 | 2011-05-20 14:46:09 -0700 | [diff] [blame] | 27 | || true |