Pharo test defects

RunnerLongDurationTest

State
Fixed (image fix)
Defect in
the test
Tests
2
Fix
image fix 20-RunnerLongDurationTest.st
Upstream repository
pharo-project/pharo

Record

Both tests began with an unconditional self skip, left in the upstream test source. The code under test (NewTestRunner runClass: and runClasses: with the LongTest fixture) works. With the self skip line removed, both tests pass on our VM and on Cog. The fix is to remove that line from each test method and keep all the assertions.

Test Defect in State Cause
RunnerLongDurationTest>>testRunningFromAClass test repaired Unconditional self skip as the first statement of the test method. No VM or image defect.
RunnerLongDurationTest>>testRunningFromACollectionOfClasses test repaired Unconditional self skip as the first statement of the test method. No VM or image defect.

Regression check: Only the two test methods changed. No non-test method changed. I ran the whole owning class RunnerLongDurationTest on both VMs: before the fix 2 SKIP on each VM, after the fix 2 PASS on each VM (3 runs each). I did not run the other TestRunner-Tests classes, because no code they test was changed. I did not run ours-nojit.

Upstream note: Title: Re-enable RunnerLongDurationTest tests (remove the leftover self skip). Description: testRunningFromAClass and testRunningFromACollectionOfClasses in RunnerLongDurationTest begin with self skip, so they never run. With the skip removed they pass on Pharo 14 build 791 on stock Cog and on a second VM, in 3 s and 9 s. This is a pharo repository change (TestRunner-Tests); the owner reviews it before anything is sent to Cog or Pharo.

Results

Last full sweeps of 2026-11-17: iospharo (sweep14-new14) and stock Cog with the Cog changes (sweepcogp14-new10), with all image fixes. "Before" is the state of the test before the repairs. The Stock Cog column has a value only where the record measured stock Cog: "PASS 3 of 3 (repair run)" is the check of each repair on stock Cog v12.0.6 with the fix entry; "-" is not measured separately.

TestBeforeStateiospharo VMPatched CogStock Cog
RunnerLongDurationTest>>testRunningFromAClassSKIPrepairedPASSPASSPASS 3 of 3 (repair run)
RunnerLongDurationTest>>testRunningFromACollectionOfClassesSKIPrepairedPASSPASSPASS 3 of 3 (repair run)

Test

Run the tests in a Pharo 14 image (build 791). Before the fix they skip, fail or carry the expected-failure mark.

"Run in a Playground of a Pharo 14 image (Do it and print each line)."
((RunnerLongDurationTest selector: #testRunningFromAClass) run) printString.
((RunnerLongDurationTest selector: #testRunningFromACollectionOfClasses) run) printString.

Source of the tests before the fix

RunnerLongDurationTest>>testRunningFromAClass before the fix (Pharo 14 build 791)
testRunningFromAClass

	self skip.
	runner runClass: self longTestClass.
	self assert: runner runCount equals: 1.
	self assert: runner passedCount equals: 1
RunnerLongDurationTest>>testRunningFromACollectionOfClasses before the fix (Pharo 14 build 791)
testRunningFromACollectionOfClasses

	self skip.
	runner runClasses: { LongTest . LongTest . LongTest }.
	self assert: runner runCount equals: 3.
	self assert: runner passedCount equals: 3

Fix

How to apply an entries file: file in 00-header.st and the entries file as one chunk (the iospharo script scripts/gen-image-fixes.py makes that chunk). Each entry checks for the defect first and prints FIXED, ADDED or SKIP. Download 00-header.st.

20-RunnerLongDurationTest.st (download)
fix value: #RunnerLongDurationTest value: #testRunningFromAClass value: [ :s | s includesSubstring: 'self skip' ] value: 'testRunningFromAClass

	runner runClass: self longTestClass.
	self assert: runner runCount equals: 1.
	self assert: runner passedCount equals: 1'.
fix value: #RunnerLongDurationTest value: #testRunningFromACollectionOfClasses value: [ :s | s includesSubstring: 'self skip' ] value: 'testRunningFromACollectionOfClasses

	runner runClasses: { LongTest . LongTest . LongTest }.
	self assert: runner runCount equals: 3.
	self assert: runner passedCount equals: 3'.

State of 2026-11-20. Made from the test records of the iospharo project (a second Pharo VM). The fixes are proposals for review.