Hi,
Now that the continuous integration build is using the cool ZeroConf infrastructure, we
needed a clean way to run all tests from Moose based on the information gathered from the
ConfigurationOfMoose. More precisely we want to run all the tests from all packages that
are in the 'Tests' group from all configurations referred from
ConfigurationOfMoose (including itself) :).
It's sounds more complicated than it actually is:
packages
| packages |
packages := Set new.
(self mooseDevelopmentVersion packagesForSpecNamed: 'Tests') do: [ :spec |
packages add: spec name ].
self mooseDevelopmentVersion projects do: [ :each |
(each version packagesForSpecNamed: 'Tests') do: [ :spec | packages add: spec
name ] ].
^ packages
We used to have this logic in an .st file that was ran through the builder from Lukas.
But, now, I simply created the MooseTestRunnerCommandLineHandler as a subclass of
TestRunnerCommandLineHandler, and provided the new packages. I gave it the commandName of
'moosetest' and now I can simply call from the command line:
Pharo ./Moose-latest-dev-4.8.image moosetest
In Moose, we have a little package named: Moose-Development-Tools that is loaded by the
configuration. I added the new class to it, and I can easily integrate the whole test
running in the ci job after loading the configuration.
I'd say it's pretty neat.
Cheers,
Doru
p.s. The VM still crashes when running the tests though (at least on Mac)
--
www.tudorgirba.com
"Beauty is where we see it."