Levente Uzonyi uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-ul.233.mcz
==================== Summary ====================
Name: KernelTests-ul.233
Author: ul
Time: 16 September 2012, 8:17:11.75 pm
UUID: 6a2da463-10c3-7e46-9c87-69204b8d1163
Ancestors: KernelTests-ul.232
Speed-up for CompiledMethodComparisonTest >> #testHash:
- instead of comparing all methods with all other, only compare methods which have the same size and header
- only compare each pair of methods at most once (assuming #= is symmetric)
It now takes less than 30 seconds using the interpreter VM on a 4 years old notebook.
Also added a progress bar and decreased the timeout.
=============== Diff against KernelTests-ul.232 ===============
Item was changed:
----- Method: CompiledMethodComparisonTest>>testHash (in category 'tests') -----
testHash
+ <timeout: 120>
+
- <timeout: 300> "takes 90 seconds in trunk 4.3 on a 2.2GHz Intel Core i7 MacBook Pro"
| ai |
ai := CompiledMethod allInstances.
+ "We assume here that if two CompiledMethods are equal then they have the same size and header."
+ ((ai
+ groupBy: [ :method | { method size. method header } ]
+ having: [ :methods | true ])
+ collect: [ :each | each asArray ])
+ do: [ :methods |
+ 1 to: methods size do: [ :i |
+ i to: methods size do: [ :j |
+ (methods at: i) = (methods at: j) ifTrue: [
+ self assert: (methods at: i) hash equals: (methods at: i) hash ] ] ] ]
+ displayingProgress: 'Testing hashes'.
+ self assert: (ai collect: [ :cm | cm hash ] as: Set) size * 2 >= ai asSet size!
- ai do:
- [:a|
- ai do:
- [:b|
- a = b ifTrue: [self assert: a hash = b hash]]].
- self assert: (ai collect: [:cm| cm hash]) asSet size * 2 >= ai asSet size!
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.167.mcz
==================== Summary ====================
Name: Tests-ul.167
Author: ul
Time: 14 September 2012, 4:33:14.57 pm
UUID: 7a6b5557-0d58-9646-b82c-807335e58d1c
Ancestors: Tests-ul.165
Since Monticello-bf.476 MCSnapshotBrowser shows empty categories too, so include the systemCategories of the MCMockPackageInfo in MCSnapshotBrowserTest >> #allCategories in order to make MCSnapshotBrowserTest pass.
=============== Diff against Tests-ul.165 ===============
Item was changed:
----- Method: MCSnapshotBrowserTest>>allCategories (in category 'private') -----
allCategories
+
+ ^{
+ model extensionsCategory.
+ self mockCategoryName },
+ MCSnapshotResource mockPackage packageInfo systemCategories!
- ^ Array with: model extensionsCategory with: self mockCategoryName.!
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.167.mcz
==================== Summary ====================
Name: Tests-ul.167
Author: ul
Time: 14 September 2012, 4:33:14.57 pm
UUID: 7a6b5557-0d58-9646-b82c-807335e58d1c
Ancestors: Tests-ul.165
Since Monticello-bf.476 MCSnapshotBrowser shows empty categories too, so include the systemCategories of the MCMockPackageInfo in MCSnapshotBrowserTest >> #allCategories in order to make MCSnapshotBrowserTest pass.
=============== Diff against Tests-ul.165 ===============
Item was changed:
----- Method: MCSnapshotBrowserTest>>allCategories (in category 'private') -----
allCategories
+
+ ^{
+ model extensionsCategory.
+ self mockCategoryName },
+ MCSnapshotResource mockPackage packageInfo systemCategories!
- ^ Array with: model extensionsCategory with: self mockCategoryName.!
Levente Uzonyi uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ul.167.mcz
==================== Summary ====================
Name: Tests-ul.167
Author: ul
Time: 14 September 2012, 4:33:14.57 pm
UUID: 7a6b5557-0d58-9646-b82c-807335e58d1c
Ancestors: Tests-ul.165
Since Monticello-bf.476 MCSnapshotBrowser shows empty categories too, so include the systemCategories of the MCMockPackageInfo in MCSnapshotBrowserTest >> #allCategories in order to make MCSnapshotBrowserTest pass.
=============== Diff against Tests-ul.165 ===============
Item was changed:
----- Method: MCSnapshotBrowserTest>>allCategories (in category 'private') -----
allCategories
+
+ ^{
+ model extensionsCategory.
+ self mockCategoryName },
+ MCSnapshotResource mockPackage packageInfo systemCategories!
- ^ Array with: model extensionsCategory with: self mockCategoryName.!