I'm close to having ported all of our projects to pharo 2.0. Now I'm asking 
myself what would be a proper setup to run my jenkins build scripts. With 
RPackage there are more packages in the system then before and in the jenkins 
scripts you need to invoke

HDTestReport forPackages: #( …)

In 1.4 I just added them manually. Using 2.0 makes this too cumbersome to deal 
with. So I need to figure out the amount of tests programmatically. The first I 
came up with (and that would solve my common use case) is something like


myPrefix := 'Emcee-'
myPackages := RPackage organizer packages select: [:each| each name beginsWith: 
myPrefix ].
packagesWithTests := myPackages select: [ :package| package classes anySatisfy: 
[ :cls| cls includesBehavior: TestCase  ] ].
packagesNamedTest := myPackages select: [ :each| each name includesSubstring: 
'-Tests-' ].
testPackages := packagesWithTests union: packagesNamedTest.
packages := myPackages difference: packagesNamedTest.

HDTestReport runPackages: (testPackages collect: #name).
HDLintReport runPackages: (packages collect: #name)

So I like to ask how you guys are doing it. Thanks in advance for your answers.

Norbert

Reply via email to