[Cuis-dev] [IMPROV] Make TestRunner use TimeProfileBrowser

Gerald Klix cuis.01 at klix.ch
Thu Jun 17 23:56:45 PDT 2021


Hi all, Hi Juan,

I just discovered that nice TimeProfileBrowser class
and thought: "If its there it should be used!"

Please find enclosed a change set that uses the
aforementioned browser in the test runner for profiling
testsuites.


HTH and Best Regards,

Gerald
-------------- next part --------------
'From Haver 5.0 [latest update: #4638] on 18 June 2021 at 8:49:05 am'!

!TestRunner methodsFor: 'processing' stamp: 'KLG 6/18/2021 08:42:36'!
runSuiteProfiled: suite
	running ifNotNil: [ ^self inform: 'already running' ].
	suite addDependent: self.
	totalTests _ suite tests size.
	completedTests _ 0.
	running _ [
            [ result _ TimeProfileBrowser onBlock: [suite run] ]
	            ensure: [
		            running _ nil.
				suite removeDependent: self.
				runSemaphore signal.
				UISupervisor whenUIinSafeState: [
					self updateWindow: result.
			      	self changed: #runTests.
			      	self changed: #runOneTest.
				].
	            ].
     ] newProcess.
	self runWindow.
      self changed: #runTests.
      self changed: #runOneTest.
      running
		name: 'TestRunner';
"	      priority: Processor userBackgroundPriority;"
	      resume.
! !



More information about the Cuis-dev mailing list