The Trunk: Tests-ct.518.mcz

[email protected] Wed, 1 Jul 2026 11:58:05 0000
Newsgroups gmane.comp.lang.smalltalk.squeak.general
Message-ID <[email protected]>
Christoph Thiede uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-ct.518.mcz

==================== Summary ====================

Name: Tests-ct.518
Author: ct
Time: 1 July 2026, 1:58:03.229267 pm
UUID: 2cef36f8-1ef5-4e94-9a10-c0fcd9f293b5
Ancestors: Tests-ct.517

Cleans up smoke tests for installer and consistently disables them by default as they have serious side effects. Previously, smoke tests were generated when #suiteClass was sent, which only happened when testing the individual class but not through the TestRunner. The new opt-in allows us to run them in the CI without putting local images at risk.

Also revises tests by raising timeout, failing when a merge conflict is encountered, and documenting expected failures.

Thanks to Jens (jl) for the hint!

=============== Diff against Tests-ct.517 ===============

Item was added:
+ TestCase subclass: #InstallerSmokeTest
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Tests-Installer-Core'!
+ 
+ !InstallerSmokeTest commentStamp: 'ct 7/1/2026 13:18' prior: 0!
+ I contain smoke tests for package definitions of the installer. NB: By default, I am empty. You can opt in by generating tests. USE WITH CAUTION: This will load or overwrite packages in your image and execute Monticello load scripts!!
+ 
+ To opt in, do:
+ 	InstallerSmokeTest generateTests.
+ 	InstallerSmokeTest suite run.!

Item was added:
+ ----- Method: InstallerSmokeTest class>>generateTests (in category 'support') -----
+ generateTests
+ 
+ 	InstallerSmokeTestResource new.!

Item was added:
+ ----- Method: InstallerSmokeTest class>>regenerateTests (in category 'support') -----
+ regenerateTests
+ 
+ 	self removeTests; generateTests.!

Item was added:
+ ----- Method: InstallerSmokeTest class>>removeTests (in category 'support') -----
+ removeTests
+ 
+ 	InstallerSmokeTestResource cleanUp.!

Item was added:
+ ----- Method: InstallerSmokeTest>>defaultTimeout (in category 'running - timeout') -----
+ defaultTimeout
+ 
+ 	^ 30 "seconds"!

Item was added:
+ ----- Method: InstallerSmokeTest>>expectedFailures (in category 'failures') -----
+ expectedFailures
+ 
+ 	^ super expectedFailures ,
+ 		#(testmathMorphs testmorphicWrappers testsqueaksource) "merge conflicts"!

Item was added:
+ ----- Method: InstallerSmokeTest>>performTest (in category 'private') -----
+ performTest
+ 
+ 	^ [super performTest]
+ 		on: MCMergeResolutionRequest
+ 		do: [:ex | self fail: ex description]!

Item was added:
+ TestResource subclass: #InstallerSmokeTestResource
+ 	instanceVariableNames: ''
+ 	classVariableNames: ''
+ 	poolDictionaries: ''
+ 	category: 'Tests-Installer-Core'!
+ 
+ !InstallerSmokeTestResource commentStamp: 'ct 7/1/2026 13:18' prior: 0!
+ When this resource is used, additional smoke tests are generated for each package definition that is defined in the installer. THESE TESTS MAY LOAD OR OVERWRITE PACKAGES AND RUN CODE IN YOUR IMAGE!! See comment in InstallerSmokeTest.!

Item was added:
+ ----- Method: InstallerSmokeTestResource class>>cleanUp (in category 'initialize-release') -----
+ cleanUp
+ 
+ 	self new tearDown.!

Item was added:
+ ----- Method: InstallerSmokeTestResource>>ensureTestMethods (in category 'test generation') -----
+ ensureTestMethods
+ 	"Ensure InstallerSmokeTest has test methods for each externally-loadable package defined by Installer.  By generating these methods, they don't have to be maintained separately."
+ 	^ (Installer selectorsInCategory: 'package-definitions') do:
+ 		[ : each | (InstallerSmokeTest canUnderstand: each) ifFalse:
+ 			[ InstallerSmokeTest
+ 				compile:
+ 					(String streamContents:
+ 						[ : stream | stream
+ 							 nextPutAll: 'test'; nextPutAll: each;
+ 							 cr; tab;
+ 							 nextPutAll: 'Installer new merge: #'; nextPutAll: each ])
+ 				classified: self testCategoryName ] ]!

Item was added:
+ ----- Method: InstallerSmokeTestResource>>setUp (in category 'running') -----
+ setUp
+ 
+ 	super setUp.
+ 	
+ 	self ensureTestMethods!

Item was added:
+ ----- Method: InstallerSmokeTestResource>>tearDown (in category 'running') -----
+ tearDown
+ 
+ 	[InstallerSmokeTest removeCategory: self testCategoryName]
+ 		ensure: [super tearDown].!

Item was added:
+ ----- Method: InstallerSmokeTestResource>>testCategoryName (in category 'test generation') -----
+ testCategoryName
+ 
+ 	^ '*autogenerated-tests'!

Item was removed:
- ----- Method: InstallerTest class>>suiteClass (in category 'as yet unclassified') -----
- suiteClass
- 	^ InstallerTestSuite!

Item was removed:
- TestSuite subclass: #InstallerTestSuite
- 	instanceVariableNames: ''
- 	classVariableNames: ''
- 	poolDictionaries: ''
- 	category: 'Tests-Installer-Core'!

Item was removed:
- ----- Method: InstallerTestSuite>>ensureTestMethods (in category 'initialize-release') -----
- ensureTestMethods
- 	"Ensure InstallerTest has test methods for each externally-loadable package defined by Installer.  By generating these methods, they don't have to be maintained separately."
- 	^ (Installer selectorsInCategory: 'package-definitions') do:
- 		[ : each | (InstallerTest canUnderstand: each) ifFalse:
- 			[ InstallerTest 
- 				compile:
- 					(String streamContents:
- 						[ : stream | stream
- 							 nextPutAll: 'test'; nextPutAll: each;
- 							 cr; tab;
- 							 nextPutAll: 'Installer new merge: #'; nextPutAll: each ])
- 				classified: '*generated' ] ]!

Item was removed:
- ----- Method: InstallerTestSuite>>initialize (in category 'initialize-release') -----
- initialize
- 	super initialize.
- 	self ensureTestMethods!

Item was changed:
  (PackageInfo named: 'Tests') postscript: 'PackageOrganizer default unregisterPackageNamed: ''Test-Monticello-Mocks''.
  { MCMockPackageInfo. MCEmptyPackageInfo. MCDirtyPackageInfo } do: [ :each | 
+ 	each initialize ].
+ InstallerTest removeCategory: ''*generated''. "Tests-ct.518: clean up installer smoke tests"'!
- 	each initialize ]
- '!

Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]