|
Re: "Cannot open launch config from" when trying to run junit [message #665804 is a reply to message #665755] |
Sat, 16 April 2011 05:58 |
|
On 2011-04-15 20:09, JLynch@appliedtrg.com wrote:
> I have been trying for the last few days to get the junit command to work on my RCP project that is successfully being
> built by buckminster on my Hudson server. The error code I get is "Cannot open launch config from
> /com.ats.tests_1.0.0-osgi.bundle/AllTests.launch" . I know that the command wants the plug-in name that the launch file
> is in.
No, that's false. The command want's the workspace location of the config file, i.e. the name of the project as it is
shown in your package explorer. Assuming that you project name is 'com.ats.tests', you should try:
junit -l com.ats.tests/AllTests.launch
If in doubt, the command junit --help is your friend. Among other things, it prints the full explanation of the -l
parameter as:
-l
--launch
The workspace location of the *.launch file that specifies the tests to run. If, for example,
your workspace contains a project named "com.acme.foobar" and this contains a launch
configuration named "alltests.launch", you would pass "com.acme.foobar/alltests.launch" as an
argument to the "-l" parameter.
HTH,
Thomas Hallgren
|
|
|
|
Re: "Cannot open launch config from" when trying to run junit [message #666094 is a reply to message #666039] |
Tue, 19 April 2011 06:16 |
|
On 2011-04-18 19:54, Justin Lynch wrote:
> I agree that junit -l com.ats.tests/AllTests.launch should be the correct command. As I wrote that was my first try.
> Sadly that doesn't work. After figuring the help for the command must simply be wrong I started my search to see what
> google would provide. It provided other people saying the help was wrong and you needed to use the name it resolved to
> after building it in buckminister.
That's wrong. It's never been that way. The help is correct.
> Now I have tried both ways and it still does not work. I am really at a loss as to
> what I am doing wrong. I am sure it is something simple but I don't know what it is.
> I tried junit -l com.ats.tests/AllTests.launch again just to make sure that didn't work. I get the following:
>
> INFO: junit '-l' 'com.ats.tests/AllTests.launch'
> Cannot open launch config from com.ats.tests/AllTests.launch
>
> I have verified that com.ats.tests has AllTests.launch in it in the workspace. I have verified that the project name is
> com.ats.tests and that the plug-in name is com.ats.tests. Thanks,
> Justin
>
That is surprising. The code the prints that message is no rocket science. It does this:
IResource launchFile = ResourcesPlugin.getWorkspace().getRoot().findMember(launchNa me);
if (launchFile == null || launchFile.getType() != IResource.FILE || !launchFile.exists())
throw BuckminsterException.fromMessage(NLS.bind(Messages.Launch_Ca nnot_open_launch_config, launchName));
The 'launchName' in this case is what you pass in. Are you using a -data <workspace> option to appoint your workspace?
If not, how do you ensure that you use the right workspace?
- thomas
|
|
|
|
Re: "Cannot open launch config from" when trying to run junit [message #666260 is a reply to message #666243] |
Tue, 19 April 2011 15:57 |
|
On 2011-04-19 16:48, Justin Lynch wrote:
> The file currently sits at 'C:\hudson\jobs\RDACTests\workspace\com.ats.tests\AllTests.l aunch'
> Thanks again for all your help!
>
The physical location of the file doesn't matter. It can be anywhere. The important thing is that your workspace
contains a (logical) project with that name.
Try starting an Eclipse IDE on the workspace. My guess is that you won't find the launch file there either.
- thomas
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04211 seconds