Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion How to execute a single test?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Mirco Dotta  
View profile  
 More options Jul 28 2012, 5:49 am
From: Mirco Dotta <mirco.do...@typesafe.com>
Date: Sat, 28 Jul 2012 11:49:21 +0200
Local: Sat, Jul 28 2012 5:49 am
Subject: Re: [scala-ide-dev] How to execute a single test?

On Jul 27, 2012, at 8:32 PM, sschaef wrote:

> On 07/27/2012 06:23 PM, Mirco Dotta wrote:
>>> Ok, now I have broken something. While executing the `build-all.sh` script (as `./build-all.sh clean install -P scala-2.10.x`), I get errors in the test phase. The interesting thing is when I execute the tests inside of eclipse I get no errors. How can that be?

>>> I did a complete build all inside of eclipse, refreshed the workspace, restarted the IDE but it still works fine in eclipse.

>>> The errors are:

>>> findReferencesInConstructorSuperCall(scala.tools.eclipse.findreferences.Fin dReferencesTests): Don't know how to convert element `layout` of type `class org.eclipse.jdt.internal.core.ResolvedBinaryMethod`
>>> findReferencesInClassFields(scala.tools.eclipse.findreferences.FindReferenc esTests): Don't know how to convert element `layout` of type `class org.eclipse.jdt.internal.core.ResolvedBinaryMethod`

>> Aha, that's a known issue which seem to be happening only on Linux (I'm assuming you are on Linux). On Mac they work fine. Odd, isn't it?

>> I have no clue why there is a difference between Mac and Linux, but I'd be sure interested if you can gather some more info on this.
> Yes, I'm using Linux. What for information are you looking for?

> I can give you the complete output of maven: http://www.file-upload.net/download-4604582/mvnlog.html

I really wonder why a reference to `layout` is found, when the in test cases I'm looking for references of a complete different name.

First thing, it would be good to know what is the fully qualified name of `layout`. So, in the following https://github.com/scala-ide/scala-ide/blob/master/org.scala-ide.sdt...., can you change the first parameter passed to `format` to the following `fullname(e)`.

That will give us one more information, but it won't be enough to understand what's going on (still, I'm curious to know from where that binary method comes from). The only "easy" way I see to fix this is through debugging, but that won't be easy to achieve given the issue is reproducible only when the tests are ran via maven.

In a nutshell, you need to find the maven command for running one single test (I believe Luc explained how to do so in this very same thread), and you will need to pass some VM arguments to the maven Scala runner so that the process is stopped until a debugger is attached (I think you can just modify the POM.xml and pass the right vm arguments to the scala maven plugin - the arguments are something like `-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000`)
If you can get this to work, then from Eclipse it is possible to create a Debug configuration for a `Remote Java Application`, which will allow you to connect to the waiting maven process and start debugging.

I know this is far from being easy to put in place. I'll try to see how this can be done during next week, and write back to you.

> Is it possible to activate the log done in eclipse with Maven? Inside of eclipse I can't reproduce the problem but I can change the error message if you need more internal information (and if you have a clue what to search for).

The log is already activated, and the level is set to DEBUG (which is the most noisy level we have for logging). If you want to log more information, you simply need to mix-in the `HasLogger` in the class, and then use the inherited `logger` field.

> By the way, I did the quick fix for the lazy val problem. I tested it against the find references test and all works fine. Is this enough for a pull request? Shall I test the change against the complete test suite?

Yes, in general you should always run the whole test suite. And you should also make sure that tests pass against both 2.9 and 2.10.

Further, when you issue a pull request (PR), we have a PR validator that merges your contribution in a local branch (based on master) and runs the build for both 2.9 and 2.10. That is to say that even if you forget to do it, the validator does it for you the moment you create the PR. Isn't that sweet :)

> If yes I can only do this inside of eclipse not with maven (see error above ;)).

Now, in your case, you can just create the PR. The validator will make sure that your code can be built with both 2.9 and 2.10.

> Some other things I should pay attention to?

There is nothing special. After you create the PR, someone will review it. If needed, the reviewer and the reviewee will discuss the feedback and make the needed changes to the PR. Once both parties are happy, the PR is merged and closed.

Oh, one more thing, all (new) contributors are asked to sign the Typesafe CLA (http://www.typesafe.com/contribute/cla), before we can merge their PR.

Looking forward to your PR! :)

-- Mirco


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.