Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350099

Summary: Ensure Helgrind tests pass with Tycho
Product: [Tools] Linux Tools Reporter: Andrew Overholt <overholt>
Component: ValgrindAssignee: Daniel Henrique Barboza <danielhb>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: sgehwolf, wainersm
Version: unspecified   
Target Milestone: 0.8.1   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 350100    

Description Andrew Overholt CLA 2011-06-22 16:16:27 EDT
Of one reverts c7f08d2e, running mvn -fae clean install (in valgrind/ if one has already run an overall build or one in profiling/) will run the Helgrind tests.  At present they all fail for me due to the CDT projects not being built.  Is this reproducible on a setup other than my own?  Note that Maven >= 3 is necessary.
Comment 1 Daniel Henrique Barboza CLA 2011-06-22 16:40:45 EDT
I haven't ran the Helgrind tests using Tycho. Actually I know very little about Tycho itself :)

I'll install it on my machine and give a go on the Helgrind tests with it.
Comment 2 Daniel Henrique Barboza CLA 2011-07-05 09:37:33 EDT
Bump! 

Finally got Tycho working on my machine and tried to run the helgrind.tests with it. I noticed that the plug-in was missing the pom.xml file (like all other plugi-ns have) so I have added it. 

Now it seems to be working (I didn't get the error you described, but I'm not sure what output I should consider "successful" ). I can keep investigating it further, as I said I'm new at maven / tycho so it's possible I can missing something else.

If you want to give it a try I have updated the pull request to include the pom.xml inside the plug-in.

https://github.com/danielhb/linuxtools/commit/7b47db9a4330acbe3032339fc9452d6a262c6c1a
Comment 3 Severin Gehwolf CLA 2011-07-10 08:40:48 EDT
(In reply to comment #2)
> Bump! 
> 
> Finally got Tycho working on my machine and tried to run the helgrind.tests
> with it. I noticed that the plug-in was missing the pom.xml file (like all
> other plugi-ns have) so I have added it. 
> 
> Now it seems to be working (I didn't get the error you described, but I'm not
> sure what output I should consider "successful" ). I can keep investigating it
> further, as I said I'm new at maven / tycho so it's possible I can missing
> something else.
> 
> If you want to give it a try I have updated the pull request to include the
> pom.xml inside the plug-in.
> 
> https://github.com/danielhb/linuxtools/commit/7b47db9a4330acbe3032339fc9452d6a262c6c1a

I'll have a look and see if I can reproduce Andrew's failures. I'll keep you posted, as to what I find, thanks!
Comment 4 Andrew Overholt CLA 2011-07-14 17:15:12 EDT
It looks like I already added the helgrind.tests pom.xml in commit cbeeda913f1453b6adc317a171046fbc3547a578.  Perhaps you need to rebase your branch?

If I do a maven build in profiling, then valgrind, then go into helgrind.tests and run mvn -fae clean install (with a maven >= 3.0), I get failures for the tests where it can't find the CDT binaries.  Does this happen for you, too, Daniel?  Be sure you have commit 1c1d756 which includes a fix to the pom.xml:

http://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.git/commit/?id=1c1d75264150799e584590e5ae0a9e1062d2897e
Comment 5 Daniel Henrique Barboza CLA 2011-07-25 14:34:40 EDT
Hello,

Sorry the delay to answer this. A lot is happening lately on the work :(

I've tried to do as you asked - build profiling and valgrind with maven. But I got the following error while building:

-------------

 [Software being installed: org.eclipse.linuxtools.valgrind.cachegrind.tests 0.8.0.qualifier, Missing requirement: org.eclipse.linuxtools.valgrind.cachegrind.tests 0.8.0.qualifier requires 'package org.eclipse.linuxtools.profiling.tests 0.0.0' but it could not be found]
[ERROR] Internal error: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: No solution found because the problem is unsatisfiable. -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: No solution found because the problem is unsatisfiable.
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:600)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: java.lang.RuntimeException: org.eclipse.equinox.p2.core.ProvisionException: No solution found because the problem is unsatisfiable.
	at org.eclipse.tycho.p2.impl.resolver.ProjectorResolutionStrategy.resolve(ProjectorResolutionStrategy.java:102)
	at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:324)
	at org.eclipse.tycho.p2.impl.resolver.P2ResolverImpl.resolveProject(P2ResolverImpl.java:293)
	at org.eclipse.tycho.p2.facade.P2TargetPlatformResolver.doResolvePlatform(P2TargetPlatformResolver.java:389)
	at org.eclipse.tycho.p2.facade.P2TargetPlatformResolver.resolvePlatform(P2TargetPlatformResolver.java:150)
	at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.resolveProject(DefaultTychoDependencyResolver.java:90)
	at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:91)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:273)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	... 11 more
Caused by: org.eclipse.equinox.p2.core.ProvisionException: No solution found because the problem is unsatisfiable.
	... 20 more

------------


The command I've used to build was "mvn integration-test" on both cases (profiling and valgrind). 


Maybe I'm building them wrong? My tree is up-to-date with the current linuxtools master.
Comment 6 Severin Gehwolf CLA 2011-07-25 14:56:20 EDT
> The command I've used to build was "mvn integration-test" on both cases
> (profiling and valgrind). 
  
> Maybe I'm building them wrong? My tree is up-to-date with the current
> linuxtools master.


What if you try "mvn -fae clean install" instead?
Comment 7 Daniel Henrique Barboza CLA 2011-07-25 15:59:56 EDT
Hi Severin,

After doing as you suggested I managed to successfully build profiling and valgrind. Now I can see the error on the helgrind.tests plugin, but I'm not sure if it's the same error (CDT binaries) as Andrew described.

I'll take a look at it during this week and keep this bug posted.
Comment 8 Daniel Henrique Barboza CLA 2011-07-26 01:13:59 EDT
Hello everyone,

I think I got it right this time. The problem was on MANIFEST.MF file which wasn't included a couple of cdt.managedbuild dependencies. I took the chance to revisit the plug-in and clean up / redo a few tests to make them clearer.

I've ran several times "mvn -fae -X clean install" at helgrind.tests dir and now Tycho says "Build successful" at the end.

The commit link on github:

https://github.com/danielhb/linuxtools/commit/01ece3b4c5f6872ce15ae8ba9c3db4d02712dc21

Note that I haven't changed the valgrind/pom.xml file, which has a comment on the helgrind.tests module. I suppose someone else will do it as soon as it's verified that it won't break Tycho build no longer.


Finally, for any legal purpose, I assert that I have the legal clearance to contribute this code, this code was made by me and it's being contributed under the terms of EPL.
Comment 9 Andrew Overholt CLA 2011-07-27 11:25:05 EDT
Thanks, Daniel, this looks pretty good to me.  My only concern is having to go through a legal review due to the size of the commit.  Could you perhaps list a bunch of small commits for us to cherry-pick so that they're each < 250 lines and thus don't have to go through legal review?  Thanks again!
Comment 10 Daniel Henrique Barboza CLA 2011-07-27 20:53:54 EDT
Hi Andrew,

You mean to fragment the same patch but into < 250 lines parts? I can do that, but it might take a while hehehe the whole patch is almost 5k lines long.

Perhaps the cleanup went too deep. What I can do is try to fix the issue with Tycho and the builds without deleting/recreating too many files, but that will leave some "garbage" into the plug-in which should be deleted.

Speaking of deleting, does file removals count as contribution? I mean, if I create a patch which delete all the files of a directory (I kinda did that) and contribute it, does it need legal approval? If it doesn't need then I can create a separated patch with all the removals and then work on cleaner patches.
Comment 11 Andrew Overholt CLA 2011-07-28 11:00:44 EDT
Yes, all patch lines are counted so removals do count.  For now how about you do what you suggest and just fix the issue with Tycho running the tests and then we can clean up the other garbage later?  Thanks, Daniel!
Comment 12 Daniel Henrique Barboza CLA 2011-08-03 13:41:46 EDT
Hello Andrew,

Think I got it right this time. I just did minimal changes to make it work with Tycho. Please tell me if this is small enough:

https://github.com/danielhb/linuxtools/commit/01ece3b4c5f6872ce15ae8ba9c3db4d02712dc21


Note that I haven't changed the valgrind/pom.xml file. Someone should uncomment the line with the helgrind tests plugin if everything works fine.

For any legal purpose, I assert that I have the legal clearance to
contribute this code, this code was made by me and it's being contributed under
the terms of EPL.
Comment 13 Andrew Overholt CLA 2011-08-03 16:11:15 EDT
Are you sure that's the right commit, Daniel?  I think you might have meant:

https://github.com/danielhb/linuxtools/commit/eaa34fe011066492784053f7ba0b42fd6910afbb

If that's correct,  yes, we can definitely accept that without legal approval since it's < 250 lines in total.  If you can confirm this is the commit you'd like me to pull, I will do so and uncomment the line in the pom.xml.

Thanks again!
Comment 14 Daniel Henrique Barboza CLA 2011-08-03 16:36:34 EDT
hehehe sorry about that Andrew! A missplaced copy/pasted :(

Yes, you're correct. The commit

https://github.com/danielhb/linuxtools/commit/eaa34fe011066492784053f7ba0b42fd6910afbb


is the one I meant on my previous post. Please, go on and pull this commit.
Comment 15 Andrew Overholt CLA 2011-08-03 16:57:15 EDT
Cool, I've pulled and pushed this commit.  I'll do a local build to ensure the tests pass and then will push a change to uncomment them in pom.xml.  Thanks again, Daniel!
Comment 16 Andrew Overholt CLA 2011-08-08 12:06:35 EDT
I've pushed a minor change that was necessary (leaving out specific testSuite and testClass and just letting Maven figure out what tests to run) and un-commented the running of the Helgrind test suite in 2029d30dc5c0266ffe36e7d5fe7967746a35a052.  Once we have a successful build with them, we'll close this bug.
Comment 17 Andrew Overholt CLA 2011-08-08 14:58:24 EDT
The tests ran and all passed:

https://hudson.eclipse.org/hudson/job/linuxtools-master/468/testReport/org.eclipse.linuxtools.internal.valgrind.helgrind.tests/

Thanks for this, Daniel!