| Summary: | [launcher] create unit tests | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Equinox | Reporter: | Andrew Niefer <aniefer> | ||||
| Component: | Launcher | Assignee: | Project Inbox <equinox.launcher-inbox> | ||||
| Status: | CLOSED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | mober.at+eclipse, tjwatson | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | stalebug | ||||||
| Attachments: |
|
||||||
|
Description
Andrew Niefer
(In reply to comment #0) > > I'm not really sure of what the implementation of such tests would look like. > (2) can likely be junit or session tests. I'm not sure about (1). Note that session tests currently bypass the native launcher in order to run a separate eclipse instance to run a test. So these tests either need to be junit tests that invoke the launcher directly, or we need to enhance the SessionTestRunner to allow an option to launcher with the native launcher. Created attachment 176555 [details] launcherTests v1 Attached is a first implementation of Unittests for the Equinox Launcher. The basic trick here is exercising eclipse.exe with a special -jar that does nothing but print its commandline. That way, eclipse.exe can be exercised with different commandline / INI file variations, and the result commandline is checked. The test also has a watchdog which kills the target in case anything takes longer than 5 seconds. Implementation is plain JUnit, and reading Java System Properties to configure what exe, dll, vm, other args to use. 2 shared launch configs are provided to show how it is executed; executing from the Workspace works out of the box with these. Integrating into standard test runs (via test.xml) or local builds (build.bat / .sh) should be fairly straightforward, using the Java commandline that's generated by those Launches. See the provided README.TXT for more details. For now, the only real test is for the new --launcher.appendVmargs functionality from bug 149994, but it should be very straightforward to add more tests now that the Infrastructure is there. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug. If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |