[squeak-dev] 12 red tests to go...

Levente Uzonyi leves at elte.hu
Mon Aug 13 13:53:18 UTC 2012


On Mon, 6 Aug 2012, Frank Shearar wrote:

> After a crash course in how PackageInfo actually works, we're down to
> 12 failing tests:
> http://www.squeakci.org/job/SqueakTrunk/26/testReport/?
>
> (For the curious: while your browser shows 'Compression-Streams' and
> 'Compression-Archives', these are not packages (i.e., instances of
> PackageInfo) but just strings. The PackageInfo you seek is PackageInfo
> named: 'Compression', the base token of any category.

That's not entirely true. Some packages have dash in their names, like 
HelpSystem-Tests or XML-Parser

>
> Or, if you prefer, if you want to find all packages that contain tests
> (in alphabetical order), run:
>
> ((((TestCase allSubclasses collect: #category) "Find all
> test-containing categories"
>    collect: [:cat | (cat splitBy: '-') first]) asSet) "Convert
> categories to package names, and remove duplicates"
>        intersection: (PackageInfo allPackages collect: #name))
> asSortedCollection "Limit to actually occuring PackageInfo instances"
>
> The above's not 100% accurate, because it will include abstract TestCases.

This expression gives you exactly what you need:

(PackageInfo allPackages
 	select: [ :each | each classes anySatisfy: [ :ea | ea inheritsFrom: TestCase ] ]
 	thenCollect: #name) sort.

It returns 25 packages in my image, while your expression only gives 17.


Levente

>
> I deliberately flattened the above and stored explicit package names
> in the test setup under version control; this lets us easily bisect
> the list of packages when hunting down why, say, a Compiler test
> crashes the image (because of a missing sound library).
>
> frank
>
>


More information about the Squeak-dev mailing list