Fossil SCM

Make test suite assurance levels generic (ie not just utf), document the new flags, and add to release checklist

danshearer 2026-11-22 11:02 UTC test-suite-new
Commit e78c89e28f4ae8bb2f1c23b87a70dcf810bb8d4ae33a8cc5e26825d9ef8da300
--- src/main.mk
+++ src/main.mk
@@ -638,10 +638,11 @@
638638
# -keep Keep the temporary workspace for debugging
639639
# -prot Write a detailed log of the tests to the file ./prot
640640
# -verbose Include even more details in the output
641641
# -quiet Hide most output from the terminal
642642
# -strict Treat known bugs as failures
643
+# -assurance smoke|ci|stress How thorough a run is
643644
#
644645
# TESTFLAGS can also include names of specific test files to limit
645646
# the run to just those test cases.
646647
#
647648
test: $(APPNAME)
648649
--- src/main.mk
+++ src/main.mk
@@ -638,10 +638,11 @@
638 # -keep Keep the temporary workspace for debugging
639 # -prot Write a detailed log of the tests to the file ./prot
640 # -verbose Include even more details in the output
641 # -quiet Hide most output from the terminal
642 # -strict Treat known bugs as failures
 
643 #
644 # TESTFLAGS can also include names of specific test files to limit
645 # the run to just those test cases.
646 #
647 test: $(APPNAME)
648
--- src/main.mk
+++ src/main.mk
@@ -638,10 +638,11 @@
638 # -keep Keep the temporary workspace for debugging
639 # -prot Write a detailed log of the tests to the file ./prot
640 # -verbose Include even more details in the output
641 # -quiet Hide most output from the terminal
642 # -strict Treat known bugs as failures
643 # -assurance smoke|ci|stress How thorough a run is
644 #
645 # TESTFLAGS can also include names of specific test files to limit
646 # the run to just those test cases.
647 #
648 test: $(APPNAME)
649
--- test/release-checklist.wiki
+++ test/release-checklist.wiki
@@ -9,11 +9,11 @@
99
the command "<b>fossil ui --page doc/ckout/test/release-checklist.wiki</b>".
1010
That is the only way the links below will work.
1111
1212
<li><p>
1313
From a private directory (not the source tree) run
14
-"<b>tclsh $SRC/test/tester.tcl $FOSSIL</b>" where $FOSSIL is the
14
+"<b>tclsh $SRC/test/tester.tcl $FOSSIL -assurance ci</b>" where $FOSSIL is the
1515
name of the executable under test and $SRC is the source tree.
1616
Verify that there are no errors.
1717
1818
<li><p>
1919
Click on each of the links in in the
2020
--- test/release-checklist.wiki
+++ test/release-checklist.wiki
@@ -9,11 +9,11 @@
9 the command "<b>fossil ui --page doc/ckout/test/release-checklist.wiki</b>".
10 That is the only way the links below will work.
11
12 <li><p>
13 From a private directory (not the source tree) run
14 "<b>tclsh $SRC/test/tester.tcl $FOSSIL</b>" where $FOSSIL is the
15 name of the executable under test and $SRC is the source tree.
16 Verify that there are no errors.
17
18 <li><p>
19 Click on each of the links in in the
20
--- test/release-checklist.wiki
+++ test/release-checklist.wiki
@@ -9,11 +9,11 @@
9 the command "<b>fossil ui --page doc/ckout/test/release-checklist.wiki</b>".
10 That is the only way the links below will work.
11
12 <li><p>
13 From a private directory (not the source tree) run
14 "<b>tclsh $SRC/test/tester.tcl $FOSSIL -assurance ci</b>" where $FOSSIL is the
15 name of the executable under test and $SRC is the source tree.
16 Verify that there are no errors.
17
18 <li><p>
19 Click on each of the links in in the
20
+14 -14
--- test/tester.tcl
+++ test/tester.tcl
@@ -22,11 +22,11 @@
2222
# tclsh ../test/tester.tcl ./fossil -quiet merge1 update
2323
#
2424
# The first argument is the fossil executable to test, followed by
2525
# the test files, so "update" runs test/update.test. See test/README.md
2626
# for details of options such as -strict, -halt, -prot, -trials,
27
-# -utf-assurance etc.
27
+# -assurance etc.
2828
#
2929
3030
# Minimum Tcl is 8.6. auto.def should have found us a suitable Tcl
3131
# installation. Care is needed to keep compatible with both 8.6 and 9.0.
3232
package require Tcl 8.6-
@@ -90,22 +90,22 @@
9090
}
9191
set TRIALS_EXPLICIT 1
9292
set argv [lreplace $argv $i [expr {$i + 1}]]
9393
}
9494
95
-# Unicode case-folding assurance level for unicode-pathnames.test.
95
+# Assurance level from -assurance.
9696
# Unrelated to -trials. smoke ⊂ ci ⊂ stress; default is smoke.
97
-set UTF_ASSURANCE smoke
98
-set i [lsearch -exact $argv -utf-assurance]
97
+set ASSURANCE smoke
98
+set i [lsearch -exact $argv -assurance]
9999
if {$i >= 0} {
100100
if {$i + 1 >= [llength $argv]} {
101
- puts stderr "missing value for -utf-assurance"
101
+ puts stderr "missing value for -assurance"
102102
exit 1
103103
}
104
- set UTF_ASSURANCE [lindex $argv [expr {$i + 1}]]
105
- if {$UTF_ASSURANCE ni {smoke ci stress}} {
106
- puts stderr "-utf-assurance requires smoke, ci, or stress"
104
+ set ASSURANCE [lindex $argv [expr {$i + 1}]]
105
+ if {$ASSURANCE ni {smoke ci stress}} {
106
+ puts stderr "-assurance requires smoke, ci, or stress"
107107
exit 1
108108
}
109109
set argv [lreplace $argv $i [expr {$i + 1}]]
110110
}
111111
@@ -606,13 +606,13 @@
606606
return [expr {min(5, $::TRIALS)}]
607607
}
608608
return $::TRIALS
609609
}
610610
611
-# Return the -utf-assurance level: smoke, ci, or stress.
612
-proc test_utf_assurance {} {
613
- return $::UTF_ASSURANCE
611
+# Return the -assurance level: smoke, ci, or stress.
612
+proc test_assurance {} {
613
+ return $::ASSURANCE
614614
}
615615
616616
# After writing PATH A under DIR, return 1 if PATH B names the same
617617
# directory entry on this volume.
618618
proc fs_paths_collide {dir a b} {
@@ -628,11 +628,11 @@
628628
629629
# Classify the temporary volume once: whether ASCII case, NFC vs NFD,
630630
# and sharp-s vs "ss" collapse to one directory entry. Stores a dict
631631
# on ::fs_type with keys ascii_case, normalization, and sharp_s, each
632632
# 1 when the two spellings are one entry. Called at harness startup
633
-# for every run, independent of -utf-assurance.
633
+# for every run, independent of -assurance.
634634
proc fs_classify {} {
635635
set dir [file join $::tempPath fs_classify_[pid]]
636636
file mkdir $dir
637637
set savedEncoding [encoding system]
638638
encoding system utf-8
@@ -1228,14 +1228,14 @@
12281228
}
12291229
12301230
12311231
protInit $fossilexe
12321232
protOut "***** Testing $fossilexe"
1233
-protOut "***** utf-assurance: $::UTF_ASSURANCE" 1
1233
+protOut "***** assurance: $::ASSURANCE" 1
12341234
12351235
# Classify the temp volume before any .test file runs. Always, for
1236
-# every -utf-assurance level and even when unicode-pathnames is not
1236
+# every -assurance level and even when unicode-pathnames is not
12371237
# among the files under test.
12381238
fs_classify
12391239
12401240
set ::tempKeepHome 1
12411241
12421242
--- test/tester.tcl
+++ test/tester.tcl
@@ -22,11 +22,11 @@
22 # tclsh ../test/tester.tcl ./fossil -quiet merge1 update
23 #
24 # The first argument is the fossil executable to test, followed by
25 # the test files, so "update" runs test/update.test. See test/README.md
26 # for details of options such as -strict, -halt, -prot, -trials,
27 # -utf-assurance etc.
28 #
29
30 # Minimum Tcl is 8.6. auto.def should have found us a suitable Tcl
31 # installation. Care is needed to keep compatible with both 8.6 and 9.0.
32 package require Tcl 8.6-
@@ -90,22 +90,22 @@
90 }
91 set TRIALS_EXPLICIT 1
92 set argv [lreplace $argv $i [expr {$i + 1}]]
93 }
94
95 # Unicode case-folding assurance level for unicode-pathnames.test.
96 # Unrelated to -trials. smoke ⊂ ci ⊂ stress; default is smoke.
97 set UTF_ASSURANCE smoke
98 set i [lsearch -exact $argv -utf-assurance]
99 if {$i >= 0} {
100 if {$i + 1 >= [llength $argv]} {
101 puts stderr "missing value for -utf-assurance"
102 exit 1
103 }
104 set UTF_ASSURANCE [lindex $argv [expr {$i + 1}]]
105 if {$UTF_ASSURANCE ni {smoke ci stress}} {
106 puts stderr "-utf-assurance requires smoke, ci, or stress"
107 exit 1
108 }
109 set argv [lreplace $argv $i [expr {$i + 1}]]
110 }
111
@@ -606,13 +606,13 @@
606 return [expr {min(5, $::TRIALS)}]
607 }
608 return $::TRIALS
609 }
610
611 # Return the -utf-assurance level: smoke, ci, or stress.
612 proc test_utf_assurance {} {
613 return $::UTF_ASSURANCE
614 }
615
616 # After writing PATH A under DIR, return 1 if PATH B names the same
617 # directory entry on this volume.
618 proc fs_paths_collide {dir a b} {
@@ -628,11 +628,11 @@
628
629 # Classify the temporary volume once: whether ASCII case, NFC vs NFD,
630 # and sharp-s vs "ss" collapse to one directory entry. Stores a dict
631 # on ::fs_type with keys ascii_case, normalization, and sharp_s, each
632 # 1 when the two spellings are one entry. Called at harness startup
633 # for every run, independent of -utf-assurance.
634 proc fs_classify {} {
635 set dir [file join $::tempPath fs_classify_[pid]]
636 file mkdir $dir
637 set savedEncoding [encoding system]
638 encoding system utf-8
@@ -1228,14 +1228,14 @@
1228 }
1229
1230
1231 protInit $fossilexe
1232 protOut "***** Testing $fossilexe"
1233 protOut "***** utf-assurance: $::UTF_ASSURANCE" 1
1234
1235 # Classify the temp volume before any .test file runs. Always, for
1236 # every -utf-assurance level and even when unicode-pathnames is not
1237 # among the files under test.
1238 fs_classify
1239
1240 set ::tempKeepHome 1
1241
1242
--- test/tester.tcl
+++ test/tester.tcl
@@ -22,11 +22,11 @@
22 # tclsh ../test/tester.tcl ./fossil -quiet merge1 update
23 #
24 # The first argument is the fossil executable to test, followed by
25 # the test files, so "update" runs test/update.test. See test/README.md
26 # for details of options such as -strict, -halt, -prot, -trials,
27 # -assurance etc.
28 #
29
30 # Minimum Tcl is 8.6. auto.def should have found us a suitable Tcl
31 # installation. Care is needed to keep compatible with both 8.6 and 9.0.
32 package require Tcl 8.6-
@@ -90,22 +90,22 @@
90 }
91 set TRIALS_EXPLICIT 1
92 set argv [lreplace $argv $i [expr {$i + 1}]]
93 }
94
95 # Assurance level from -assurance.
96 # Unrelated to -trials. smoke ⊂ ci ⊂ stress; default is smoke.
97 set ASSURANCE smoke
98 set i [lsearch -exact $argv -assurance]
99 if {$i >= 0} {
100 if {$i + 1 >= [llength $argv]} {
101 puts stderr "missing value for -assurance"
102 exit 1
103 }
104 set ASSURANCE [lindex $argv [expr {$i + 1}]]
105 if {$ASSURANCE ni {smoke ci stress}} {
106 puts stderr "-assurance requires smoke, ci, or stress"
107 exit 1
108 }
109 set argv [lreplace $argv $i [expr {$i + 1}]]
110 }
111
@@ -606,13 +606,13 @@
606 return [expr {min(5, $::TRIALS)}]
607 }
608 return $::TRIALS
609 }
610
611 # Return the -assurance level: smoke, ci, or stress.
612 proc test_assurance {} {
613 return $::ASSURANCE
614 }
615
616 # After writing PATH A under DIR, return 1 if PATH B names the same
617 # directory entry on this volume.
618 proc fs_paths_collide {dir a b} {
@@ -628,11 +628,11 @@
628
629 # Classify the temporary volume once: whether ASCII case, NFC vs NFD,
630 # and sharp-s vs "ss" collapse to one directory entry. Stores a dict
631 # on ::fs_type with keys ascii_case, normalization, and sharp_s, each
632 # 1 when the two spellings are one entry. Called at harness startup
633 # for every run, independent of -assurance.
634 proc fs_classify {} {
635 set dir [file join $::tempPath fs_classify_[pid]]
636 file mkdir $dir
637 set savedEncoding [encoding system]
638 encoding system utf-8
@@ -1228,14 +1228,14 @@
1228 }
1229
1230
1231 protInit $fossilexe
1232 protOut "***** Testing $fossilexe"
1233 protOut "***** assurance: $::ASSURANCE" 1
1234
1235 # Classify the temp volume before any .test file runs. Always, for
1236 # every -assurance level and even when unicode-pathnames is not
1237 # among the files under test.
1238 fs_classify
1239
1240 set ::tempKeepHome 1
1241
1242
--- test/unicode-pathnames.test
+++ test/unicode-pathnames.test
@@ -28,11 +28,11 @@
2828
# that ignores case and normalization has one file for both names.
2929
#
3030
# The harness classifies the temporary volume once at startup
3131
# (::fs_type). This file predicts match, miss, or untestable from
3232
# that classification, Fossil argv rewriting, and the rules above.
33
-# -utf-assurance selects how many pairs to run: smoke (one per
33
+# -assurance selects how many pairs to run: smoke (one per
3434
# behavior class), ci (the lists below), or stress (ci plus generated
3535
# pairs). Unmet predictions fail the run.
3636
#
3737
# Case folding maps both the sharp s, U+00DF, and the capital sharp s,
3838
# U+1E9E, to the two letters "ss", so by D145 a name with a sharp s and
@@ -201,14 +201,14 @@
201201
set upStressCollide [list \
202202
stress-latin "\u00f6ffentlich.txt" "\u00d6FFENTLICH.TXT" \
203203
stress-nfd "na\u00efve.txt" "nai\u0308ve.txt" \
204204
]
205205
206
-# Build the pair lists for the current -utf-assurance level.
206
+# Build the pair lists for the current -assurance level.
207207
#
208208
proc up_select {all smokeLabels} {
209
- set level [test_utf_assurance]
209
+ set level [test_assurance]
210210
if {$level eq "smoke"} {
211211
set out [list]
212212
foreach {label a b} $all {
213213
if {$label in $smokeLabels} {
214214
lappend out $label $a $b
@@ -221,11 +221,11 @@
221221
222222
set upSame [up_select $upSameAll $upSmokeSame]
223223
set upDifferent [up_select $upDifferentAll $upSmokeDifferent]
224224
set upCollide [up_select $upCollideAll $upSmokeCollide]
225225
226
-if {[test_utf_assurance] eq "stress"} {
226
+if {[test_assurance] eq "stress"} {
227227
foreach {label a b} $upStressSame {
228228
lappend upSame $label $a $b
229229
}
230230
foreach {label a b} $upStressDifferent {
231231
lappend upDifferent $label $a $b
232232
--- test/unicode-pathnames.test
+++ test/unicode-pathnames.test
@@ -28,11 +28,11 @@
28 # that ignores case and normalization has one file for both names.
29 #
30 # The harness classifies the temporary volume once at startup
31 # (::fs_type). This file predicts match, miss, or untestable from
32 # that classification, Fossil argv rewriting, and the rules above.
33 # -utf-assurance selects how many pairs to run: smoke (one per
34 # behavior class), ci (the lists below), or stress (ci plus generated
35 # pairs). Unmet predictions fail the run.
36 #
37 # Case folding maps both the sharp s, U+00DF, and the capital sharp s,
38 # U+1E9E, to the two letters "ss", so by D145 a name with a sharp s and
@@ -201,14 +201,14 @@
201 set upStressCollide [list \
202 stress-latin "\u00f6ffentlich.txt" "\u00d6FFENTLICH.TXT" \
203 stress-nfd "na\u00efve.txt" "nai\u0308ve.txt" \
204 ]
205
206 # Build the pair lists for the current -utf-assurance level.
207 #
208 proc up_select {all smokeLabels} {
209 set level [test_utf_assurance]
210 if {$level eq "smoke"} {
211 set out [list]
212 foreach {label a b} $all {
213 if {$label in $smokeLabels} {
214 lappend out $label $a $b
@@ -221,11 +221,11 @@
221
222 set upSame [up_select $upSameAll $upSmokeSame]
223 set upDifferent [up_select $upDifferentAll $upSmokeDifferent]
224 set upCollide [up_select $upCollideAll $upSmokeCollide]
225
226 if {[test_utf_assurance] eq "stress"} {
227 foreach {label a b} $upStressSame {
228 lappend upSame $label $a $b
229 }
230 foreach {label a b} $upStressDifferent {
231 lappend upDifferent $label $a $b
232
--- test/unicode-pathnames.test
+++ test/unicode-pathnames.test
@@ -28,11 +28,11 @@
28 # that ignores case and normalization has one file for both names.
29 #
30 # The harness classifies the temporary volume once at startup
31 # (::fs_type). This file predicts match, miss, or untestable from
32 # that classification, Fossil argv rewriting, and the rules above.
33 # -assurance selects how many pairs to run: smoke (one per
34 # behavior class), ci (the lists below), or stress (ci plus generated
35 # pairs). Unmet predictions fail the run.
36 #
37 # Case folding maps both the sharp s, U+00DF, and the capital sharp s,
38 # U+1E9E, to the two letters "ss", so by D145 a name with a sharp s and
@@ -201,14 +201,14 @@
201 set upStressCollide [list \
202 stress-latin "\u00f6ffentlich.txt" "\u00d6FFENTLICH.TXT" \
203 stress-nfd "na\u00efve.txt" "nai\u0308ve.txt" \
204 ]
205
206 # Build the pair lists for the current -assurance level.
207 #
208 proc up_select {all smokeLabels} {
209 set level [test_assurance]
210 if {$level eq "smoke"} {
211 set out [list]
212 foreach {label a b} $all {
213 if {$label in $smokeLabels} {
214 lappend out $label $a $b
@@ -221,11 +221,11 @@
221
222 set upSame [up_select $upSameAll $upSmokeSame]
223 set upDifferent [up_select $upDifferentAll $upSmokeDifferent]
224 set upCollide [up_select $upCollideAll $upSmokeCollide]
225
226 if {[test_assurance] eq "stress"} {
227 foreach {label a b} $upStressSame {
228 lappend upSame $label $a $b
229 }
230 foreach {label a b} $upStressDifferent {
231 lappend upDifferent $label $a $b
232
+2 -2
--- test/utf.test
+++ test/utf.test
@@ -15,11 +15,11 @@
1515
#
1616
############################################################################
1717
#
1818
# Test UTF-8/UTF-16 detection via fossil test-looks-like-utf.
1919
#
20
-# -utf-assurance selects how many cells to run: smoke (stratified
20
+# -assurance selects how many cells to run: smoke (stratified
2121
# edges), ci (full BOM x payload x extra product), or stress (ci plus
2222
# generated payloads). Expectations come from a Tcl predictor over
2323
# the bytes written, not from a fossil-echo dump. Each LOOK_*/BOM
2424
# line is checked for both yes and no.
2525
#
@@ -710,11 +710,11 @@
710710
lappend out utf16-abc $bom16$text16
711711
return $out
712712
}
713713
714714
# Select cells for the current assurance level.
715
-set level [test_utf_assurance]
715
+set level [test_assurance]
716716
if {$level eq "smoke"} {
717717
set utfCells [utf_smoke_cells]
718718
} else {
719719
set utfCells [utf_all_product_cells]
720720
}
721721
--- test/utf.test
+++ test/utf.test
@@ -15,11 +15,11 @@
15 #
16 ############################################################################
17 #
18 # Test UTF-8/UTF-16 detection via fossil test-looks-like-utf.
19 #
20 # -utf-assurance selects how many cells to run: smoke (stratified
21 # edges), ci (full BOM x payload x extra product), or stress (ci plus
22 # generated payloads). Expectations come from a Tcl predictor over
23 # the bytes written, not from a fossil-echo dump. Each LOOK_*/BOM
24 # line is checked for both yes and no.
25 #
@@ -710,11 +710,11 @@
710 lappend out utf16-abc $bom16$text16
711 return $out
712 }
713
714 # Select cells for the current assurance level.
715 set level [test_utf_assurance]
716 if {$level eq "smoke"} {
717 set utfCells [utf_smoke_cells]
718 } else {
719 set utfCells [utf_all_product_cells]
720 }
721
--- test/utf.test
+++ test/utf.test
@@ -15,11 +15,11 @@
15 #
16 ############################################################################
17 #
18 # Test UTF-8/UTF-16 detection via fossil test-looks-like-utf.
19 #
20 # -assurance selects how many cells to run: smoke (stratified
21 # edges), ci (full BOM x payload x extra product), or stress (ci plus
22 # generated payloads). Expectations come from a Tcl predictor over
23 # the bytes written, not from a fossil-echo dump. Each LOOK_*/BOM
24 # line is checked for both yes and no.
25 #
@@ -710,11 +710,11 @@
710 lappend out utf16-abc $bom16$text16
711 return $out
712 }
713
714 # Select cells for the current assurance level.
715 set level [test_assurance]
716 if {$level eq "smoke"} {
717 set utfCells [utf_smoke_cells]
718 } else {
719 set utfCells [utf_all_product_cells]
720 }
721
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -415,10 +415,11 @@
415415
# -keep Keep the temporary workspace for debugging
416416
# -prot Write a detailed log of the tests to the file ./prot
417417
# -verbose Include even more details in the output
418418
# -quiet Hide most output from the terminal
419419
# -strict Treat known bugs as failures
420
+# -assurance smoke|ci|stress How thorough a run is
420421
#
421422
# TESTFLAGS can also include names of specific test files to limit
422423
# the run to just those test cases.
423424
#
424425
test: $(APPNAME)
425426
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -415,10 +415,11 @@
415 # -keep Keep the temporary workspace for debugging
416 # -prot Write a detailed log of the tests to the file ./prot
417 # -verbose Include even more details in the output
418 # -quiet Hide most output from the terminal
419 # -strict Treat known bugs as failures
 
420 #
421 # TESTFLAGS can also include names of specific test files to limit
422 # the run to just those test cases.
423 #
424 test: $(APPNAME)
425
--- tools/makemake.tcl
+++ tools/makemake.tcl
@@ -415,10 +415,11 @@
415 # -keep Keep the temporary workspace for debugging
416 # -prot Write a detailed log of the tests to the file ./prot
417 # -verbose Include even more details in the output
418 # -quiet Hide most output from the terminal
419 # -strict Treat known bugs as failures
420 # -assurance smoke|ci|stress How thorough a run is
421 #
422 # TESTFLAGS can also include names of specific test files to limit
423 # the run to just those test cases.
424 #
425 test: $(APPNAME)
426

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button