Elliott Hughes | 6bb4aac | 2011-05-20 14:46:49 -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 | 5ee33f9 | 2011-06-01 10:13:20 -0700 | [diff] [blame] | 6 | VOGAR="vogar $VOGAR_FLAGS" |
Elliott Hughes | 6bb4aac | 2011-05-20 14:46:49 -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 | 5ee33f9 | 2011-06-01 10:13:20 -0700 | [diff] [blame] | 10 | all_test_packages=$(find `dirname $0`/*/src/test -name "*.java" | \ |
Elliott Hughes | 6bb4aac | 2011-05-20 14:46:49 -0700 | [diff] [blame] | 11 | fgrep -v junit | \ |
| 12 | fgrep -v org/w3c/domts | \ |
| 13 | fgrep -v support/src/test/java | \ |
| 14 | xargs grep -h '^package ' | sed 's/^package //' | sed 's/;$//' | sort | uniq | tr "\n" " ") |
| 15 | |
Elliott Hughes | 5ee33f9 | 2011-06-01 10:13:20 -0700 | [diff] [blame] | 16 | # Use the list of packages supplied on the command-line, if any. |
| 17 | test_packages=${*:-$all_test_packages} |
| 18 | |
Elliott Hughes | 6bb4aac | 2011-05-20 14:46:49 -0700 | [diff] [blame] | 19 | echo "Running tests for following test packages:" |
Elliott Hughes | 5ee33f9 | 2011-06-01 10:13:20 -0700 | [diff] [blame] | 20 | echo $test_packages | tr " " "\n" |
Elliott Hughes | 6bb4aac | 2011-05-20 14:46:49 -0700 | [diff] [blame] | 21 | |
| 22 | # beans: works, except IndexedPropertyDescriptorTest won't load |
| 23 | # concurrent: needs vogar to detect code type in the target VM |
| 24 | # crypto: many of the javax.crypto tests fail due to classloader visibility issues |
| 25 | # logging: many failures due to missing bundles |
| 26 | # prefs: many prefs tests fail; this needs investigation |
| 27 | |
| 28 | $VOGAR \ |
| 29 | --vm-arg -Xmx32M \ |
| 30 | --classpath out/host/common/obj/JAVA_LIBRARIES/apache-harmony-tests-hostdex_intermediates/javalib.jar \ |
| 31 | --results-dir /home/dalvik-prebuild/vogar-harmony-results \ |
Elliott Hughes | 5ee33f9 | 2011-06-01 10:13:20 -0700 | [diff] [blame] | 32 | $test_packages \ |
Elliott Hughes | 6bb4aac | 2011-05-20 14:46:49 -0700 | [diff] [blame] | 33 | || true |