summaryrefslogtreecommitdiff
path: root/tools/runner/java
AgeCommit message (Collapse)Author
2010-04-26Removing vogar from Dalvik's git tree; the source is now on code.google.com.Jesse Wilson
http://code.google.com/p/vogar/
2010-04-21Suppress all failures in setSecurityManager() with vogar.Jesse Wilson
2010-04-20Fixing reset() on SAXParser and DocumentBuilder, and cleaning up nearby tests.Jesse Wilson
Also fixing vogar to support a directory of test expectations, so we can group them by file rather than colocating failures we want to fix with those that we don't.
2010-04-18Tidying up the error reporting.Jesse Wilson
We were spamming our logs with a bunch of redundant messages, particularly surrounding timeouts. This should reduce the log output to only the useful stuff when a test takes too long to complete. Also not blowing away the full XML report when a few tests get lost along the way.
2010-04-18Small vogar changes in response to the review for change 49052.Jesse Wilson
2010-04-16Teaching vogar to run prebuilt .jar files.Jesse Wilson
Also trying to simplify some internals. We always build to intermediate .jar files now. I've renamed TestFinder to RunnerSpec and fixed its users.
2010-04-08Show a summary of failures at the end of a vogar run.Elliott Hughes
Super-useful when running a large batch of jtreg tests, and also useful for comparing against an earlier run (though hopefully we'll have a better solution for that eventually). Change-Id: I144f72ea1ae5240393b0b33193d7773537b7ee20
2010-04-07Merge "Fixing a vogar issue where outcomes weren't making their way into ↵Jesse Wilson
XML." into dalvik-dev
2010-04-07Fixing a vogar issue where outcomes weren't making their way into XML.Jesse Wilson
2010-04-06Adding support for command line args to vogar-initiated processes.Jesse Wilson
Also adding monitor timeouts for use by the continuous build. From the huge number of files in this relatively simple CL, it's becoming clear that we need to simplify vogar's internals!
2010-04-05Merge "Fix vogar host mode." into dalvik-devJesse Wilson
2010-04-05Fix vogar host mode.Jesse Wilson
Also addressing bdc's comments from change Ibc7cbc81, most notably an import-ordering issues that impact many files.
2010-04-03New "from scratch" Junit tests for javax.net.sslBrian Carlstrom
These new tests focusi on areas where I am making OpenSSL implementation chages, where I found differences from the RI when working on that code, and places where we were missing functionality compared to the spec. They all work on the RI, many fail on Dalvik luni/src/test/java/javax/net/ssl/AllTests.java luni/src/test/java/javax/net/ssl/SSLContextTest.java luni/src/test/java/javax/net/ssl/SSLSessionContextTest.java luni/src/test/java/javax/net/ssl/SSLSessionTest.java luni/src/test/java/javax/net/ssl/SSLSocketFactoryTest.java luni/src/test/java/javax/net/ssl/SSLSocketTest.java Adding my javax.net.ssl.AllTests to the main list luni/src/test/java/tests/AllTests.java Adding Bouncy Castle provider /usr/share/java/bcprov.jar to host classpath for testing with --java-home /usr/lib/jvm/java-6-openjdk tools/runner/java/dalvik/runner/JavaVm.java Fix usage comment to reboot to bootloader run-core-tests Change-Id: I7a7998fc7bedc7a00b1836517d043c6a27c8bd4d
2010-04-01New method-level granularity and output streaming for vogar.Jesse Wilson
2010-03-30Splitting TestRun into Action and Outcome.Jesse Wilson
Changing Vogar to prefer the word "action" over "test" to avoid deemphisizing benchmarks and main classes. Moving expectation management out of TestRun and into Expectation and the ExpectationStore. The parse method moved, but it is unchanged. Renamed ExpectedResult to Expectation. Currently outcome has 2 names: an outcome name and an action name. At the moment these are always equal. In a follow up to this change I intend to allow a single action to have multiple outcomes, which will allow JUnit tests to be tracked at the right granularity when executed by vogar.
2010-03-30Renaming dalvik.runner to Vogar!Jesse Wilson
Also moving commands and target classes to their own directories. This is all in preparation to move the code out to code.google.com
2010-03-29Tweak our test & runner so XPath tests can be executed on Hudson.Jesse Wilson
2010-03-23Fix --debug-port to --debug in vogar usageBrian Carlstrom
Change-Id: I012100578caa4f5768b7926b4fbe489c80f8d32b
2010-03-16misc DalvikRunner changesBrian Carlstrom
Summary: - "vogar --debug-port <port>" now overrides --timeout-seconds to be zero to prevent timeouts during interactive debugging - "vogar --timeout-seconds 0" now disables timeout as a side-effect of the previous change - "vogar" no longer defaults to "javac -Xmaxerrs 1" This is to make using vogar's output more useful when iteratively developing tests. continuous build needs to use "vogar --javac-arg -Xmaxerrs --javac-arg 1" - "vogar --ident ''" allows disabling of output formating This prevents output parsing problems for Emacs *compilation* buffers Change-Id: I599590c9c4fe3c57524af5c4d7f2be2e30ad4685
2010-03-16make DalvikRunner ignore .#Foo.java filesBrian Carlstrom
Emacs makes hidden bogus symlinks for open modified files such as ".#Foo.java -> user@host.pid:rand" which I'm guessing are to identify the owning user/host/process. Unfortunately, DalvikRunner was picking these up as source and trying to compile them. This change makes NamingPatternCodeFinder ignore these. In order to avoid duplicating this in all the subclasses, the subclasses now call super.matches as a first pass. Now subclasses only apply any additional filtering they want. MainFinder.matches was deleted since it wasn't adding any new restrictions. We arguably could add a better starting filter perhaps, but skipping dot files seems a reasonable first stem. Change-Id: Ic9f5ec0bb629d5e1bc25a5b80a6619a64285d2b0
2010-03-10Don't silently ignore arguments just because we don't take any.Elliott Hughes
Change-Id: Ie1d97b1b8a8a87cc8298a6de417104db324e9b47
2010-02-28am 60a65773: Minor fix for Adb.waitForNonEmptyDirectory so that waiting for ↵Brian Carlstrom
/sdcard after reboot works again. Merge commit '60a65773a7199f0a6b8f36bba00f11b84f8c0227' into dalvik-dev * commit '60a65773a7199f0a6b8f36bba00f11b84f8c0227': Minor fix for Adb.waitForNonEmptyDirectory so that waiting for /sdcard after reboot works again.
2010-02-28am d1ad6ae8: DalvikRunner --tee option to send output to a file or stdout at ↵Brian Carlstrom
runtime Merge commit 'd1ad6ae8509d5890a7175a1dcd0a3f7fceb75d23' into dalvik-dev * commit 'd1ad6ae8509d5890a7175a1dcd0a3f7fceb75d23': DalvikRunner --tee option to send output to a file or stdout at runtime
2010-02-23Fix DalvikRunner on the dalvik-dev branch.Elliott Hughes
(Longer term, we want to package junit, but this gets us running again.)
2010-02-23Minor fix for Adb.waitForNonEmptyDirectory so that waiting for /sdcard after ↵Brian Carlstrom
reboot works again.
2010-02-23DalvikRunner --tee option to send output to a file or stdout at runtimeBrian Carlstrom
Added --tee option so we can watch test output while the test is running, as opposed to waiting until all the output is collected. As part of this, Command.Builder can now optionally specifiy a PrintStream via tee (name from tee(1)). Added ADB.waitForFile to accompany ADB.waitForNonEmptyDirectory Removed gross bash wait loop hack in Activity Mode by replacing Mode.buildCommands with Mode.runTestCommand. Fixed bug that out generated APK package names did not contain a required "." in all cases.
2010-02-19Merge "Removing bogus check to permit on-host debugging."Jesse Wilson
2010-02-19Removing bogus check to permit on-host debugging.Jesse Wilson
2010-02-18More DalvikRunner cleanup.Elliott Hughes
Remove the now-unnecessary jsr305 and guava build dependencies. Move TestActivity.java -- which is only needed at *run* time -- out into lib/, which lets us simplify the makefile. Pass the dalvik.annotation.* source files to javac(1) (at *run* time) so we don't need the run-time dependency on core-intermediates [that I'd already removed in a successful attempt to find out why we had the dependency]. We need to remove all uses of those useless annotations from the harmony tests so we can get back in sync with upstream, but now also so that we can clean up this part of DalvikRunner.
2010-02-18Add a simple MD5-based cache to DalvikRunner.Elliott Hughes
This makes the new simpler scheme pretty much free. I've also made a start on simplifying the make rules, though there's more we can do, and I'll look at that next.
2010-02-17Make DalvikRunner work on production devices too.Elliott Hughes
Place pre-built .jar files in our lib/ directory, and dex/push them on demand. Change DalvikRunner to somewhat reduce the number of different classpaths in play. My feeling is that we just want one true classpath: we should build with it on the host, we should run with it on the host, we should dex everything on it, we should upload everything to the device, and we should run with it on the device. Also add a convenience script for running DalvikRunner. ("Vogar" is the proposed open source name for DalvikRunner, which really isn't as dalvikvm-specific as the name might imply.) There's a noticeable performance regression here, so my next change will be to add a cache.
2010-02-16Reverting our test runner's background building behaviour.Jesse Wilson
Our continuous build has been failing to complete lately. See: http://jwilson.mtv.corp.google.com:8080/job/master_passion/274/consoleFull In addition to this problem the continuous build is compiling many more tests ahead-of-time than we were originally - previously we would only have up to 4 tests ready-to-run at any given time. With this change the ExecutorCompletionService was building and installing all of the tests eagerly. I believe the problem might be a mismatch between how the BlockingQueue and the ExecutorCompletionService select which order to return futures. By removing the ExecutorCompletionService I remove the opportunity for such a conflict!
2010-02-11Make DalvikRunner more resilient to running immediately after device rebootBrian Carlstrom
Changed EnvironmentDevice.prepare to waitForDevice and waitForNonEmptyDirectory("/sdcard") before proceeding to fix problem with running immediately after "fastboot flashall" dalvik/libcore/tools/runner/java/dalvik/runner/EnvironmentDevice.java Added Adb.waitForDevice and Adb.waitForNonEmptyDirectory dalvik/libcore/tools/runner/java/dalvik/runner/Adb.java Added Command.executeWithTimeout based on code refactored from Mode.java dalvik/libcore/tools/runner/java/dalvik/runner/Command.java dalvik/libcore/tools/runner/java/dalvik/runner/Mode.java
2010-02-10Fix NamingPatternCodeFinder to detect final classesBrian Carlstrom
2010-02-10Remove TestRunner.success field / Make postCompileTest return voidBrian Carlstrom
SUMMARY: - Change TestRunner subclasses to instead implement a Runner interface - Cleanup runtime classpath generation - Misc improvements DETAILS: Change TestRunner subclasses to instead implement a Runner interface *Runner classes now implement the new Runner interface instead of extending TestRunner. prepareTest/test now take a "Class testClass" instead of accessing a "String testClass" from the superclass. This also means that all their "static void main" methods are removed and replaced with a single main method in TestRunner. TestActivity can now instantiate a TestRunner and call its "boolean run()" method to execute tests and retrieve their SUCCESS/FAILURE status via the return value, allowing the removeal of TestRunner.success. Mode now needs to explicitly include TestRunner.java in the list of code to compile because it no longer is implicitly found by compiling its former subclasses. java/dalvik/runner/TestRunner.java java/dalvik/runner/Runner.java java/dalvik/runner/CaliperRunner.java java/dalvik/runner/JUnitRunner.java java/dalvik/runner/JtregRunner.java java/dalvik/runner/MainRunner.java java/dalvik/runner/Mode.java CodeFinder.getRunnerClass now returns a Runner, not a TestRunner java/dalvik/runner/CodeFinder.java java/dalvik/runner/JUnitFinder.java java/dalvik/runner/CaliperFinder.java java/dalvik/runner/JtregFinder.java java/dalvik/runner/MainFinder.java Similarly, TestRun.runnerClass is now a Runner, not a TestRunner java/dalvik/runner/TestRun.java Move logic to run a test based on TestProperties.RUNNER_CLASS from TestActivity to TestRunner since its now used in all cases, not just the Activity case. TestActivity.ActivityRunner remains the one subclass of TestRunner, accessing the TestRunner.run(...) logic via super.run(...), allowing it to maintain its special result file writing logic. java/dalvik/runner/TestActivity.java java/dalvik/runner/TestRunner.java Moved writing of TestProperties.RUNNER_CLASS from ActivityMode now that it is used for all Modes. java/dalvik/runner/ActivityMode.java java/dalvik/runner/Mode.java Since CaliperRunner now has a "Class testClass", it uses the more strongly typed Runner.main(Class<? extends Benchmark>, ...) API. java/dalvik/runner/CaliperRunner.java Fixing javadoc TestRunner->Runner java/dalvik/runner/TestProperties.java Adding new Runner class to the build. Android.mk Cleanup runtime classpath generation Changed Mode.postCompileTest to return void instead of Classpath to match Most.postCompileTestRunner. Removed passing test classpath from compile to run via TestRun.testClasspath. Instead, Vm.getRuntimeSupportClasspath now is used to compute full classpath, instead of using the old TestRun.getTestClasspath in Mode. Mode.compileTest now uses a boolean to indicate compilation success, instead of null/non-null Classpath. TestRun.testClasspath is now replaced with TestRun.testCompiled which is used to track compilation success. In retrospect, it seems like using the absense of a Classpath as an indication of compilation success/failure seems like somewhat of a hack. java/dalvik/runner/Mode.java java/dalvik/runner/ActivityMode.java java/dalvik/runner/DeviceDalvikVm.java java/dalvik/runner/JavaVm.java java/dalvik/runner/TestRun.java New deviceDexFile to make sure dex file name generation stays consistent between build time and compile time. java/dalvik/runner/DeviceDalvikVm.java Changed MainRunner implementation to more closely match JtregRunner java/dalvik/runner/MainRunner.java Misc improvements Changed TestActivity to use a shutdown hook to catch when a test calls System.exit so we can be sure to write a result file and not simply wait for the timeout to catch our failure to return. java/dalvik/runner/TestActivity.java Changed Mkdir.mkdirs to use new Command().execute to get automatic logging of command execution with --verbose java/dalvik/runner/Mkdir.java Improved javadoc java/dalvik/runner/Mode.java Fixed apparently misplaced @SuppressWarnings("unchecked") java/dalvik/runner/OptionParser.java Enabling warnings as errors and turning on unchecked warnings. Android.mk Made sure test script works with fresh device and improved logging test-dalvik-runner.sh
2010-02-09DalvikRunner can run a test as an android.app.Activity & ↵Brian Carlstrom
PathClassLoader.toString change SUMMARY: - PathClassLoader.toString prints path - DalvikRunner --mode activity now working - new DalvikRunner --no-clean vs --no-clean-after behavior DETAILS Dalvik runtime change Changed PathClassLoader.toString to print the class loaders path Also fixed variable name in commented out debug code libcore/dalvik/src/main/java/dalvik/system/PathClassLoader.java Dalvik Runner changes Mode is the new abstract superclass of the existing Vm class. ActivityMode is for the new Mode of running as a Activity on the device. Vm is now a subclass of Mode and its JavaVm and DeviceDalvikVm still exist although some code has been refactored into the new Environment clases (see below) libcore/tools/runner/java/dalvik/runner/Mode.java libcore/tools/runner/java/dalvik/runner/ActivityMode.java libcore/tools/runner/java/dalvik/runner/DeviceDalvikVm.java libcore/tools/runner/java/dalvik/runner/JavaVm.java libcore/tools/runner/java/dalvik/runner/Vm.java Environment and its subclasses EnvironmentHost and EnvironmentDevice allow us to reuse some common code between the two different device modes (ActivityMode and DeviceDalvikVm). Basically code that was more about where and how to do things based on where the code was running as opposed to how the code was running moved to the Environment classes. For example, prepare() logic for /sdcard/ and ADB code in general. libcore/tools/runner/java/dalvik/runner/DeviceDalvikVm.java libcore/tools/runner/java/dalvik/runner/Environment.java libcore/tools/runner/java/dalvik/runner/EnvironmentDevice.java libcore/tools/runner/java/dalvik/runner/EnvironmentHost.java libcore/tools/runner/java/dalvik/runner/JavaVm.java libcore/tools/runner/java/dalvik/runner/Vm.java Adding new files libcore/tools/runner/Android.mk Aapt is a wrapper for "aapt" similar to Adb and Dx libcore/tools/runner/java/dalvik/runner/Aapt.java Added Adb.install and Adb.uninstall methods Changed from using File.toString to File.getPath for clarity libcore/tools/runner/java/dalvik/runner/Adb.java CodeFinder has been extended so that Driver can ask finders what they need to build and run, specifically through the new getRunnerJava and getRunnerClasspath. (As part of this NamingPatternCodeFinder's runnerClass was changed to getRunnerClass for consistency with the superclass.) This was important for running as an Activity because we want to minimize what we pack into the APK file because of the "dx --dex" runtime and not just pull in all possible runners and supporting libraries. TestRun objects also hold onto this information from their finders. libcore/tools/runner/java/dalvik/runner/Driver.java libcore/tools/runner/java/dalvik/runner/CodeFinder.java libcore/tools/runner/java/dalvik/runner/CaliperFinder.java libcore/tools/runner/java/dalvik/runner/JUnitFinder.java libcore/tools/runner/java/dalvik/runner/JtregFinder.java libcore/tools/runner/java/dalvik/runner/MainFinder.java libcore/tools/runner/java/dalvik/runner/NamingPatternCodeFinder.java libcore/tools/runner/java/dalvik/runner/TestRun.java TestRunner TestRunner's className is now testClass to clarifiy it from the runnerClass. libcore/tools/runner/java/dalvik/runner/TestRunner.java libcore/tools/runner/java/dalvik/runner/CaliperRunner.java libcore/tools/runner/java/dalvik/runner/JUnitRunner.java libcore/tools/runner/java/dalvik/runner/JtregRunner.java libcore/tools/runner/java/dalvik/runner/MainRunner.java Classpath now has a Collection.of and Collection.addAll that take a Collection<File> instead if just a File... libcore/tools/runner/java/dalvik/runner/Classpath.java Added Command.args(File arg) to avoid a lot of args(file.getPath()) libcore/tools/runner/java/dalvik/runner/Command.java Option --clean has expanded to --clean-before, --clean-after, and --clean. Now --no-clean will remove nothing as Elliot requested. --no-clean-after is now what is useful for DalvikRunner debuggin. Default is still to clean before and after. libcore/tools/runner/java/dalvik/runner/DalvikRunner.java Moved Vm.DALVIK_RUNNER_HOME to DalvikRunner.HOME. /tmp/<UUID> paths are now /tmp/dalvikrunner/<UUID> paths are easier cleanup. libcore/tools/runner/java/dalvik/runner/DalvikRunner.java Driver was changed to use a ExecutorCompletionService around the ExecutorService so that exceptions from the execute threads could be reported on the main thread. libcore/tools/runner/java/dalvik/runner/Driver.java We now build the testrunner before the test so that its classes will be around to be packed into APK files. libcore/tools/runner/java/dalvik/runner/Driver.java Dx.dex now takes File arguments instread of Strings. Dx.dex also needs to pass additional memory arguments to not run out of memory building the big dex for the APK. The values I used where from the build/core/definitions.mk libcore/tools/runner/java/dalvik/runner/Dx.java postCompile was split into postCompileTestRunner and postCompileTest because the packaging requires are very different in each case for ActivityMode. Specifically, the test runner is not post-packaged seperately, but packaged in the APK with each test. libcore/tools/runner/java/dalvik/runner/ActivityMode.java libcore/tools/runner/java/dalvik/runner/DeviceDalvikVm.java libcore/tools/runner/java/dalvik/runner/JavaVm.java libcore/tools/runner/java/dalvik/runner/Vm.java Changed testClass to test to avoid collision with new superclass field libcore/tools/runner/java/dalvik/runner/JtregRunner.java libcore/tools/runner/java/dalvik/runner/MainRunner.java Added @SuppressWarnings("unchecked") libcore/tools/runner/java/dalvik/runner/OptionParser.java New android.app.Activity based on Elliot's TestAPK. It encapsulates an ActivityRunner that invokes the appropriate TestRunner based on test.properties. libcore/tools/runner/java/dalvik/runner/TestActivity.java New class that shared contains (old and some new) between the DalvikRunner and the TestRunner. libcore/tools/runner/java/dalvik/runner/TestProperties.java Regression test script for debugging the matrix of various DalvikRunner modes and test types: libcore/tools/runner/test-dalvik-runner.sh
2010-01-29Change DalvikRunner to use newly added OptionParser.Brian Carlstrom
--skip-clean is now --no-clean --java-home now defaults to 1.5 --mode is now used to specify to run on host's java-home DalvikRunner page examples are updated with new --mode and --java-home Fixes junit tests to work on host by using changing classpath to be absolute paths Some minor scaffolding to prepare for running tests within an android.app.Activity. (Patchset 2 adds default --java-home location to usage output) (Patchset 3 address reviewer comments, mostly newbie style issues) (Patchset 4 address enh OptionParser issues, adds short/byte as well) (Patchset 5 address enh OptionParser issues, work with "java" from PATH, change deviceRunnerDir to File)
2010-01-22Adding support for arbitrary VM args in dalvik runner.Jesse Wilson
2010-01-22Teaching DalvikRunner to run arbitrary classes with main() methods.Jesse Wilson
This came up for the XML test suite, which isn't JUnit but a bunch of main methods (that ask you to verify their output independently; ugh) Also setting up the current working directory of the forked process. This only works for local VMs; setting the working directory for device VMs causes the "adb shell" call to crash.
2010-01-12Show DalvikRunner test output even on success when given --verbose.Elliott Hughes
2010-01-07Allow DalvikRunner to run tests in core library packages.Elliott Hughes
This is a bit of a hack, but I think it's not unreasonable, given the purpose of this tool (and the fact that we both favor writing our tests in the package they're testing). Bug: 2362187
2009-12-21More expectations for our test runsJesse Wilson
2009-12-20Fixing the XML emitter to honor the expectations file.Jesse Wilson
2009-12-20Fixing a busted regex in the expectations file. Also doing regex checking ↵Jesse Wilson
upfront.
2009-12-18Adding expectations for a bunch of jtreg tests.Jesse Wilson
Although tedious, we found a real bug in the mix. This also removes some of the noise from our test results.
2009-12-17Rename dalvik_jtreg to dalvik_runner.Jesse Wilson
Now that it runs caliper and JUnit, the old name was awful clumsy.