On Fri, Apr 16, 2010 at 11:08 AM, Adrian Lienhard <[email protected]> wrote:
> >> 2. When deleting all test cases using
> >>
> >> TestCase allSubclasses do: [:each | each removeFromSystem ]
> >>
>
would be great to move all this stuff
"unload all test packages"
#(Tests CollectionsTests CompilerTests FreeTypeTests GraphicsTests
KernelTests MorphicTests MultilingualTests NetworkTests ToolsTest
'Gofer-Tests')
do: [ :each | (MCPackage named: each) unload ].
"unload SUnit"
Smalltalk at: #TestCase ifPresent: [ :class |
SystemChangeNotifier uniqueInstance noMoreNotificationsFor: class ].
#(SUnitGUI SUnit) do: [ :each | (MCPackage named: each) unload ].
AppRegistry removeObsolete.
TheWorldMenu removeObsolete.
to a method called unloadAllTestsAndSUnit
so that it can be reused and not only in cleanUpForProduction
cheers
mariano
> >> I have also Monticello packages changed that are not in test
> >> packages.
> >>
> >> Hope we find the time to clearly separate the tests from
> >> the "core" package to clean unload the tests and continue
> >> the modularization efforts.
>
> We have that already. I modularized the tests in PharoCore to make them
> cleanly unloadable. Do the following for unloading all tests from PharoCore
> (in ScriptLoader new>>cleanUpForProduction):
>
> #(Tests CollectionsTests CompilerTests FreeTypeTests GraphicsTests
> KernelTests MorphicTests MultilingualTests NetworkTests ToolsTest
> 'Gofer-Tests') do: [ :each | (MCPackage named: each) unload ].
>
> If you run this in a Pharo image, it also does not leave any dirty
> packages, but obviously it does not remove the tests from external packages.
> To achieve this, the maintainers of external packages would need to separate
> the tests from the rest of their code. I don't think this is very important,
> though, because unloading tests is most important in PharoCore (that is, to
> strip down an image, you probably don't start from Pharo but PharoCore
> anyway).
>
> Cheers,
> Adrian
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project