Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tycho-dev] Please help with (test) code migration

Hi Tycho-Devs,

a lot of code from the OSGi part (that is under tycho-bundles) has been now moved to the 'org.eclipse.tycho.core.shared' mixed maven-module/OSGi bundle.

That means, everything under org.eclipse.tycho.core.shared can now be used in both "worlds".

I'll plan to migrate the remaining parts as well into plexus components so we hopefully can once drop all the "bundles" part of Tycho and fully build everything as a plain maven codes.

As converting them to components is actually quite straight-forward the tricky (and often very time consuming) part is often migrating the tests into either plain JUnit or TychoPlexus tests.

It would therefore be highly appreciated and I'd like to encourage everyone to help with migrating of those "low-hanging-fruits" tests that actually not require anything from the not migrated parts.

The steps are usually as follows:

1) Just browse the code-base under tycho-bundles/*.tests and pick a class that seems promissing, for example 'FileSetTest' 2) move the test to 'tycho-core' into a package that seems suitable (or create a new one), in the best thats it, if not maybe some adjustments are required. 3) possibly adapt the code and maybe one needs to copy/adapt some helper classes from org.eclipse.tycho.test.utils > tycho-testing-harness or copy some test-data to the new place as well. 4) If your test needs something that previously was looked up by OSGi and is now already available in "maven", you can extend the TychoPlexusTestCase and look them up with the lookup(...) method, an example can be found in VerifierServiceImplTest and MetadataSerializableImplTest


If encountering problems feel free to ask or just search for a lower-hanging-fruit :-)



Back to the top