Closed alexsnaps closed 10 years ago
You mean the tck-runner? The tck itself isn't in this repo - the jcache-tck-runner is just a thin maven wrapper that sets up the environment vars and settings to call the tck runner directly.
I agree - the tck runner should use whatever version of the spec you are working on implementing... having an outdated tck runner makes no sense. (and working on implementing a prior draft version of the spec doesn't make much sense either)
Ah yes, right, will look into trying to make this work again then yes... It's certainly much better if the build does run the TCK (had to install and run the TCK else where). Sounds good! Thanks for highlighting this!
No problem - if you need a hand with this or have questions, I can try to lend a hand. I did some of the initial stuff on it, but stopped when it was clear that the spec was undergoing a lot of internal changes and wanted to wait for it to stabilize.
I thought the RI used to have info on how to do this - I think most of the docs were moved to the spec docs or TCK user guide - but I think that this is what is wanted...
I think you can make the tck-runner use that as the parent pom but set the properties for the implementation that you want:
<properties>
<implementation-groupId>the-group-id-of-your-jcache-implementation</implementation-groupId>
<implementation-artifactId>the-artifactid-of-your-impl</implementation-artifactId>
<implementation-version>the-implementation-version<implementation-version>
<CacheManagerImpl>fully qualified class name of your cache manager impl</CacheManagerImpl>
<CacheImpl>fully qualified class name of your cache impl</CacheImpl>
... etc (see the things that are set around line 125 of the surefire runner in that pom I linked to - you'll want to set property values for all of those things)
</properties>
One nice thing about using the tck-runner thing as the parent pom for it is that you wont have to copy any of those other things. your tck-runner artifact will not be versioned alongside the rest of your stuff - since it can only have one parent, you will have to manually edit the tck-runner to update the property that points to the impl-of-your-version whenever you make changes to it to keep it in sync.
(Looking at the docs, it seems that chapter 4 in the TCK guide also describes how to set up the maven project to run the tests - you can basically do all that stuff but just keep it in your same multi-module project so when you build from the top level it will always run the tck suite too for you - you just have to remember to keep the version property in that project pointing to the version you are actually developing)
Running the TCK from there wasn't an issue. And it passes btw as of now. But looks like I can't use the specific-implementation-tester as the parent pom, as it's jar packaged. I'll see what can be done, am no maven expert (by far not!) but I'll turn to a couple of people here internally...
Ah, gotcha. copy-pasta from that pom to this one might be the best option then.... (sadly, in maven, copy-paste is a form of reuse...)
Think this fixes it... Though I also had to install the 1.0.0-SNAPSHOT TCK locally manually. Guess this won't be an issue once 1.0.0 is released
We probably should either remove or upgrade the TCK from this project. I may be in favor of the former... Probably better if we use the JSR's TCK directly (what I did for this 1.0.0-rc upgrade btw)