f84c9ce5f144583b36bc8787a74319b951ed2b75 |
|
23-Nov-2015 |
Paul Duffin <paulduffin@google.com> |
Made JUnitRunnerTest tests run in IDE This requires some modifications to the test to make them work as expected (or at least as I think they should be expected to behave) and some functional modifications too. Merge the method qualifier (the bit after the # in the test specification) with the arguments (which are method names) and run them all. Junit3 - Removed internal ConfigurationError class as it is a duplicate or a class in the package. Sorted out the filtering by method name. Junit4 - Sorted out the filtering by method name. Moved the creation of the List<VogarTest> from JUnitRunner.run() method into a new createVogarTests() static method in JUnitRunnerFactory that is called from newRunner() and from tests for testing. This required moving the args that are passed to the Runner.run() method to the RunnerFactory.newRunner() method instead. The actionName parameter was removed from Runner.run() as none of the implementations used it either. Removed test test_limiting_to_1method_and_run_for_SuiteTest_should_throw_exception from JUnitRunnerTest as there appears to be no way to make it pass. I suspect that since the last time the test passed some changes were made that broke it. Given that it's testing a failure case it seems unlikely to cause serious issues. The worst that could happen is it runs some tests that it didn't before. Added AllTests.java to include all the tests that can be currently run. Change-Id: I873ed67be3c2fe17a02f9e0cf14054df10a51c69
/external/vogar/src/vogar/target/Runner.java
|
9e776dbd9e2bdc6232adf99b1a7dad30f434f0cb |
|
04-Nov-2015 |
Paul Duffin <paulduffin@google.com> |
Separate Runner interface and implementations into two The Runner interface and implementations combine two distinct and orthogonal (although related) functions together. Namely, the checking to see whether it can run a class and the process of running the class. The problems with this are: * Instances of each piece of functionality are initialized in different ways, the instances used to check support are initialized using the constructor only, the instances used to run a test/benchmark/tool are initialized using the constructor and a separate init(...) method. * Both usages have to share the same fields, even though the fields are only ever used by the actual runners and so the fields cannot be final. * They have different life spans. The support checkers life span is essentially the life time of the code that is run on the target. The runners life span is just the length of one test/benchmark/tool being run. All of this makes it more difficult to reason about and to extend. This change is being made as part of the Caliper work because checking to see whether a specific class contains a benchmark that Caliper can run requires some state to be held in the support checker instance of CaliperRunner. Adding extra fields to hold that would make the code even more complex. The support checking aspect is moved out of Runner (and its implementations) into the new RunnerFactory (and its new corresponding implementations). The reason it is called RunnerFactory rather than RunnerChecker or something similar is because implementations are also responsible for creating an appropriate instance of the Runner. The existing code uses the Class of the Runner instance used to check support as the factory for creating it. Reflection (even something as simple as this) can make it more difficult to follow the code, e.g. it's not clear where all the instances of a class are created making code changes more difficult. This is addressed by simply having the RunnerFactory provide a newRunner(...) method that can create appropriate instances of the Runner for the class, or return null if it cannot create a Runner instance suitable for processing that class. Also, adds src/test to vogar.iml. Change-Id: I352be1335fe690f6cd25508aa1dcf17c07960152
/external/vogar/src/vogar/target/Runner.java
|
bd8bda78cc5740aeae8de67b52f1d86e208f4864 |
|
07-Mar-2011 |
jessewilson@google.com <jessewilson@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Use our own minimal JUnit instead of the full framework. This permits us to create test instances lazily and dispose of them eagerly. git-svn-id: http://vogar.googlecode.com/svn/trunk@238 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
b5c5c44d0c0a01c278cdac68ae23646682eb8ef7 |
|
19-Dec-2010 |
jessewilson@google.com <jessewilson@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Inject the log rather than looking it up statically. This is needed for other apps that want to reuse the ExpectationStore but not the rest of Vogar! git-svn-id: http://vogar.googlecode.com/svn/trunk@219 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
3cea2f55f3da60eb0c4bdd1616cbfa964ee2cd91 |
|
02-Dec-2010 |
jessewilson@google.com <jessewilson@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Fix skipPast so that it's honored across test classes. git-svn-id: http://vogar.googlecode.com/svn/trunk@210 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
5f9e5b96aaea17c60c82f11b8933d00ff52b5a85 |
|
02-Dec-2010 |
jessewilson@google.com <jessewilson@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Name main classes by their class name, not the action name. Otherwise it's ambiguous when many main methods are run from a single .jar. git-svn-id: http://vogar.googlecode.com/svn/trunk@209 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
6fa1029b5a60514952d707a51253f5929628a4ec |
|
02-Nov-2010 |
bdc@google.com <bdc@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Profiler improvements for JUnit Pushed Profiler instance down to Runner.run to allow better intergration with Runner implementations. Primary goal was to allow JUnitRunner profiling of separate test thread. src/vogar/target/Runner.java src/vogar/target/JUnitRunner.java src/vogar/target/JUnit4Runner.java src/vogar/target/CaliperRunner.java src/vogar/target/TestRunner.java src/vogar/target/MainRunner.java Change Profiler API to allow start/stop around individual tests, with setup/shutdown at overall. In single thread profiling mode, AndroidProfiler now changes the thread based to the current thread before starting, again for improve JUnitRunner behavior. src/vogar/target/Profiler.java src/vogar/android/AndroidProfiler.java git-svn-id: http://vogar.googlecode.com/svn/trunk@196 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
1bdeb9dd8f1ab3f308c285729af007ae8970425b |
|
29-Oct-2010 |
bdc@google.com <bdc@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
vogar --profile support From the vogar usage message: --profile: run with a profiler to produce an ASCII hprof file. --profile-file <filename>: filename for hprof profile data. Default is: java.hprof.txt --profile-depth <count>: number of frames in profile stack traces. Default is: 4 --profile-interval <milliseconds>: interval between profile samples. Default is: 10 --profile-thread-group: profile thread group instead of single thread in dalvikvms Note --mode jvm only supports full VM profiling. Default is: false New command line arguments parsing and usage: src/vogar/Vogar.java For the RI, we pass the profile arguments via -agentlib:hprof src/vogar/JavaVm.java TestRunner now uses the new Profiler class. Also removed unnecessary args argument from run methods. src/vogar/target/TestRunner.java New abstract Profiler class and its Android implementation. When running on the RI, hprof is used outside of the TargetRunner. Because SamplingProfiler is not a public class, it is accessed via reflection from AndroidProfiler. src/vogar/target/Profiler.java src/vogar/android/AndroidProfiler.java New TestProperties for profiler options src/vogar/Mode.java src/vogar/TestProperties.java Retrieve the profiler output in the dalvikvm src/vogar/RetrievedFilesFilter.java Runner.init now takes profile so that Caliper can know to run with --debug src/vogar/target/Runner.java src/vogar/target/CaliperRunner.java src/vogar/target/JUnitRunner.java src/vogar/target/JUnit4Runner.java src/vogar/target/MainRunner.java javadoc correction src/vogar/android/EnvironmentDevice.java src/vogar/EnvironmentHost.java Caliper revision 253 lib/caliper.jar http://code.google.com/p/vogar/issues/detail?id=16 git-svn-id: http://vogar.googlecode.com/svn/trunk@194 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
3cc430f91313dab5074cffa6508c0b47cd9f2b50 |
|
25-Oct-2010 |
jessewilson@google.com <jessewilson@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Sort tests. Kill the target process if there's a timeout. The target process has a new flag --skipPast. git-svn-id: http://vogar.googlecode.com/svn/trunk@191 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
84f59696573fe05a50e77832ee26c5abde46fa9e |
|
29-Sep-2010 |
jessewilson@google.com <jessewilson@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Use a pristine environment during class init. See issue 38. git-svn-id: http://vogar.googlecode.com/svn/trunk@171 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
37f7c3a73d290eed1bf4cdff80e029eaa7620801 |
|
22-Jul-2010 |
jessewilson@google.com <jessewilson@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Extract an interface for monitors; and permit the environments to supply custom monitors. git-svn-id: http://vogar.googlecode.com/svn/trunk@134 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
72c9585a2c7535a2a847b8c316d28d875582dc09 |
|
21-May-2010 |
jsharpe@google.com <jsharpe@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Add the ability to append "#method_name" when specifying junit test classes. It will then just run the specified method, rather every test method in the class. git-svn-id: http://vogar.googlecode.com/svn/trunk@68 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
638d42932a6aca6ddb0454674dc20b96e68faf32 |
|
19-May-2010 |
enh@google.com <enh@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
src/vogar/target/CaliperRunner.java: src/vogar/target/MainRunner.java: src/vogar/target/Runner.java: src/vogar/target/TestRunner.java: say "timeoutSeconds" instead of "timeout" where possible. git-svn-id: http://vogar.googlecode.com/svn/trunk@64 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
d296ba8af13d367b4a701ddeba405ee51caa05c1 |
|
19-May-2010 |
enh@google.com <enh@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
src/vogar/commands/AndroidSdk.java: src/vogar/commands/Command.java: src/vogar/Driver.java: src/vogar/Mode.java: src/vogar/target/CaliperRunner.java: src/vogar/target/JUnitRunner.java: src/vogar/target/MainRunner.java: src/vogar/target/Runner.java: src/vogar/target/TestRunner.java: src/vogar/TestProperties.java: src/vogar/Vogar.java: pass --timeout through to the JunitRunner. This isn't sufficient; try "~dalvik-prebuild/bin/run-harmony-tests --timeout 10 org.apache.harmony.nio_char.tests.java.nio.charset.AllTests tests.api.java.nio.charset.AllTests", for example. We still end up skipping a lot of tests, and when we time out, we get "Received bad XML from localhost:8787 org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.". git-svn-id: http://vogar.googlecode.com/svn/trunk@62 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
a7a8fe1efa0fb3299d68709d60701a045bcc72f3 |
|
13-May-2010 |
jsharpe@google.com <jsharpe@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Add class analysis so that we no longer rely on file names to determine which type of test to run (e.g. junit, caliper, etc). This decision is also now made on the device side. As a result cleaned up the RunnerSpec classes, which are no longer required. git-svn-id: http://vogar.googlecode.com/svn/trunk@53 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
400bee347dd7464ecc17dc24c82f59c59645ff44 |
|
27-Apr-2010 |
jessewilson@google.com <jessewilson@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Changing vogar to accept package names like org.json, which will cause it to run all tests in that package on its classpath. Removing the last traces of java.util.logging. We now have only two granularities: verbose (not kept by default) and info (always kept). Giving up on trying to identify an argument's type by its value. To specify arguments to the target process, list them after the actions with a --. git-svn-id: http://vogar.googlecode.com/svn/trunk@31 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|
7850f3f3da0099b76f09ed64d23e0a43ba4a5c76 |
|
23-Apr-2010 |
jessewilson@google.com <jessewilson@google.com@aa685c63-decc-881d-cd2b-7fa72aad72e1> |
Initial checkin of vogar! git-svn-id: http://vogar.googlecode.com/svn/trunk@2 aa685c63-decc-881d-cd2b-7fa72aad72e1
/external/vogar/src/vogar/target/Runner.java
|