Fossil SCM

In the test summary, give a reason if a test file is skipped

danshearer 2026-11-11 08:30 UTC test-suite-new
Commit 202176237fbe08fe305b3689cb7af08085cca6a3e393dc95ac8cfbd445996e47
+4 -4
--- test/amend.test
+++ test/amend.test
@@ -50,19 +50,19 @@
5050
########################################
5151
# Setup: Add file and commit #
5252
########################################
5353
5454
if {![uuid_from_checkout HASHINIT]} {
55
- test amend-checkout-failure false
56
- test_cleanup_then_return
55
+ test_fail_then_return amend-checkout-failure \
56
+ "could not read the check-out's hash"
5757
}
5858
write_file datafile "data"
5959
fossil add datafile
6060
fossil commit -m "c1"
6161
if {![uuid_from_commit $RESULT HASH]} {
62
- test amend-setup-failure false
63
- test_cleanup_then_return
62
+ test_fail_then_return amend-setup-failure \
63
+ "could not read the hash of the first commit: $RESULT"
6464
}
6565
6666
########################################
6767
# Test: -branch #
6868
########################################
6969
--- test/amend.test
+++ test/amend.test
@@ -50,19 +50,19 @@
50 ########################################
51 # Setup: Add file and commit #
52 ########################################
53
54 if {![uuid_from_checkout HASHINIT]} {
55 test amend-checkout-failure false
56 test_cleanup_then_return
57 }
58 write_file datafile "data"
59 fossil add datafile
60 fossil commit -m "c1"
61 if {![uuid_from_commit $RESULT HASH]} {
62 test amend-setup-failure false
63 test_cleanup_then_return
64 }
65
66 ########################################
67 # Test: -branch #
68 ########################################
69
--- test/amend.test
+++ test/amend.test
@@ -50,19 +50,19 @@
50 ########################################
51 # Setup: Add file and commit #
52 ########################################
53
54 if {![uuid_from_checkout HASHINIT]} {
55 test_fail_then_return amend-checkout-failure \
56 "could not read the check-out's hash"
57 }
58 write_file datafile "data"
59 fossil add datafile
60 fossil commit -m "c1"
61 if {![uuid_from_commit $RESULT HASH]} {
62 test_fail_then_return amend-setup-failure \
63 "could not read the hash of the first commit: $RESULT"
64 }
65
66 ########################################
67 # Test: -branch #
68 ########################################
69
+5 -9
--- test/json.test
+++ test/json.test
@@ -24,25 +24,21 @@
2424
# not configured. If that changes, these conditions might not prevent
2525
# the rest of this file from running.
2626
fossil test-th-eval "hasfeature json"
2727
2828
if {[normalize_result] ne "1"} {
29
- puts "Fossil was not compiled with JSON support."
30
- test_cleanup_then_return
29
+ test_skip "Fossil was not compiled with JSON support."
3130
}
3231
3332
# We need a JSON parser to effectively test the JSON produced by
3433
# fossil. It looks like the one from tcllib is exactly what we need.
3534
# On ActiveTcl, add it with teacup. On other platforms, YMMV.
3635
# teacup install json
3736
# teacup install json::write
3837
if {[catch {package require json}] != 0} then {
39
- puts {
40
-The "json" package for Tcl is not available.
41
-Please see: https://core.tcl-lang.org/tcllib
42
-}
43
- test_cleanup_then_return
38
+ test_skip "The \"json\" package for Tcl is not available.\
39
+Please see: https://core.tcl-lang.org/tcllib"
4440
}
4541
4642
proc json2dict {txt} {
4743
set rc [catch {::json::json2dict $txt} result options]
4844
if {$rc != 0} {
@@ -54,12 +50,12 @@
5450
5551
# and that the json itself smells ok and has the expected API error code in it
5652
fossil json -expectError
5753
set JR [json2dict $RESULT]
5854
if {$JR eq ""} {
59
- puts "Fossil was not compiled with JSON support (bad JSON)."
60
- test_cleanup_then_return
55
+ test_fail_then_return json-bad-output \
56
+ "\"fossil json\" did not return valid JSON: $RESULT"
6157
}
6258
test json-1 {[dict exists $JR resultCode]
6359
&& [dict get $JR resultCode] in "FOSSIL-3002 FOSSIL-4102"}
6460
6561
# Use the CLI interface to execute a JSON command. Sets the global
6662
--- test/json.test
+++ test/json.test
@@ -24,25 +24,21 @@
24 # not configured. If that changes, these conditions might not prevent
25 # the rest of this file from running.
26 fossil test-th-eval "hasfeature json"
27
28 if {[normalize_result] ne "1"} {
29 puts "Fossil was not compiled with JSON support."
30 test_cleanup_then_return
31 }
32
33 # We need a JSON parser to effectively test the JSON produced by
34 # fossil. It looks like the one from tcllib is exactly what we need.
35 # On ActiveTcl, add it with teacup. On other platforms, YMMV.
36 # teacup install json
37 # teacup install json::write
38 if {[catch {package require json}] != 0} then {
39 puts {
40 The "json" package for Tcl is not available.
41 Please see: https://core.tcl-lang.org/tcllib
42 }
43 test_cleanup_then_return
44 }
45
46 proc json2dict {txt} {
47 set rc [catch {::json::json2dict $txt} result options]
48 if {$rc != 0} {
@@ -54,12 +50,12 @@
54
55 # and that the json itself smells ok and has the expected API error code in it
56 fossil json -expectError
57 set JR [json2dict $RESULT]
58 if {$JR eq ""} {
59 puts "Fossil was not compiled with JSON support (bad JSON)."
60 test_cleanup_then_return
61 }
62 test json-1 {[dict exists $JR resultCode]
63 && [dict get $JR resultCode] in "FOSSIL-3002 FOSSIL-4102"}
64
65 # Use the CLI interface to execute a JSON command. Sets the global
66
--- test/json.test
+++ test/json.test
@@ -24,25 +24,21 @@
24 # not configured. If that changes, these conditions might not prevent
25 # the rest of this file from running.
26 fossil test-th-eval "hasfeature json"
27
28 if {[normalize_result] ne "1"} {
29 test_skip "Fossil was not compiled with JSON support."
 
30 }
31
32 # We need a JSON parser to effectively test the JSON produced by
33 # fossil. It looks like the one from tcllib is exactly what we need.
34 # On ActiveTcl, add it with teacup. On other platforms, YMMV.
35 # teacup install json
36 # teacup install json::write
37 if {[catch {package require json}] != 0} then {
38 test_skip "The \"json\" package for Tcl is not available.\
39 Please see: https://core.tcl-lang.org/tcllib"
 
 
 
40 }
41
42 proc json2dict {txt} {
43 set rc [catch {::json::json2dict $txt} result options]
44 if {$rc != 0} {
@@ -54,12 +50,12 @@
50
51 # and that the json itself smells ok and has the expected API error code in it
52 fossil json -expectError
53 set JR [json2dict $RESULT]
54 if {$JR eq ""} {
55 test_fail_then_return json-bad-output \
56 "\"fossil json\" did not return valid JSON: $RESULT"
57 }
58 test json-1 {[dict exists $JR resultCode]
59 && [dict get $JR resultCode] in "FOSSIL-3002 FOSSIL-4102"}
60
61 # Use the CLI interface to execute a JSON command. Sets the global
62
--- test/merge5.test
+++ test/merge5.test
@@ -16,19 +16,13 @@
1616
############################################################################
1717
#
1818
# Tests of the "merge" command
1919
#
2020
21
-if {! $::QUIET} {
22
- puts "Skipping Merge5 tests"
23
-}
24
-protOut {
25
-fossil sqlite3 --no-repository reacts badly to SQL dumped from
26
-repositories created from fossil older than version 2.0.
27
-}
2821
#test merge5-sqlite3-issue false knownBug
29
-test_cleanup_then_return
22
+test_skip "fossil sqlite3 --no-repository reacts badly to SQL dumped from\
23
+repositories created from fossil older than version 2.0."
3024
3125
# Verify the results of a check-out
3226
#
3327
proc checkout-test {testid expected_content} {
3428
set flist {}
3529
--- test/merge5.test
+++ test/merge5.test
@@ -16,19 +16,13 @@
16 ############################################################################
17 #
18 # Tests of the "merge" command
19 #
20
21 if {! $::QUIET} {
22 puts "Skipping Merge5 tests"
23 }
24 protOut {
25 fossil sqlite3 --no-repository reacts badly to SQL dumped from
26 repositories created from fossil older than version 2.0.
27 }
28 #test merge5-sqlite3-issue false knownBug
29 test_cleanup_then_return
 
30
31 # Verify the results of a check-out
32 #
33 proc checkout-test {testid expected_content} {
34 set flist {}
35
--- test/merge5.test
+++ test/merge5.test
@@ -16,19 +16,13 @@
16 ############################################################################
17 #
18 # Tests of the "merge" command
19 #
20
 
 
 
 
 
 
 
21 #test merge5-sqlite3-issue false knownBug
22 test_skip "fossil sqlite3 --no-repository reacts badly to SQL dumped from\
23 repositories created from fossil older than version 2.0."
24
25 # Verify the results of a check-out
26 #
27 proc checkout-test {testid expected_content} {
28 set flist {}
29
--- test/set-manifest.test
+++ test/set-manifest.test
@@ -34,12 +34,11 @@
3434
# We need SHA1 to effectively test the manifest files produced by
3535
# fossil. It looks like the one from tcllib is exactly what we need.
3636
# On ActiveTcl, add it with teacup. On other platforms, YMMV.
3737
# teacup install sha1
3838
if {[catch {package require sha1}] != 0} {
39
- puts "The \"sha1\" package is not available."
40
- test_cleanup_then_return
39
+ test_skip "The \"sha1\" package for Tcl is not available."
4140
}
4241
4342
# We need a repository, so let it have one.
4443
test_setup
4544
4645
--- test/set-manifest.test
+++ test/set-manifest.test
@@ -34,12 +34,11 @@
34 # We need SHA1 to effectively test the manifest files produced by
35 # fossil. It looks like the one from tcllib is exactly what we need.
36 # On ActiveTcl, add it with teacup. On other platforms, YMMV.
37 # teacup install sha1
38 if {[catch {package require sha1}] != 0} {
39 puts "The \"sha1\" package is not available."
40 test_cleanup_then_return
41 }
42
43 # We need a repository, so let it have one.
44 test_setup
45
46
--- test/set-manifest.test
+++ test/set-manifest.test
@@ -34,12 +34,11 @@
34 # We need SHA1 to effectively test the manifest files produced by
35 # fossil. It looks like the one from tcllib is exactly what we need.
36 # On ActiveTcl, add it with teacup. On other platforms, YMMV.
37 # teacup install sha1
38 if {[catch {package require sha1}] != 0} {
39 test_skip "The \"sha1\" package for Tcl is not available."
 
40 }
41
42 # We need a repository, so let it have one.
43 test_setup
44
45
--- test/settings-repo.test
+++ test/settings-repo.test
@@ -19,13 +19,12 @@
1919
#
2020
2121
set path [file dirname [info script]]
2222
2323
if {![file isdirectory [get_source_dir]]} {
24
- puts "The source directory [get_source_dir], which defines the settings\
25
-to test, is not present."
26
- test_cleanup_then_return
24
+ test_skip "The source directory [get_source_dir], which defines the\
25
+settings to test, is not present."
2726
}
2827
2928
require_no_open_checkout
3029
3130
test_setup
3231
--- test/settings-repo.test
+++ test/settings-repo.test
@@ -19,13 +19,12 @@
19 #
20
21 set path [file dirname [info script]]
22
23 if {![file isdirectory [get_source_dir]]} {
24 puts "The source directory [get_source_dir], which defines the settings\
25 to test, is not present."
26 test_cleanup_then_return
27 }
28
29 require_no_open_checkout
30
31 test_setup
32
--- test/settings-repo.test
+++ test/settings-repo.test
@@ -19,13 +19,12 @@
19 #
20
21 set path [file dirname [info script]]
22
23 if {![file isdirectory [get_source_dir]]} {
24 test_skip "The source directory [get_source_dir], which defines the\
25 settings to test, is not present."
 
26 }
27
28 require_no_open_checkout
29
30 test_setup
31
--- test/settings.test
+++ test/settings.test
@@ -19,13 +19,12 @@
1919
#
2020
2121
set path [file dirname [info script]]
2222
2323
if {![file isdirectory [get_source_dir]]} {
24
- puts "The source directory [get_source_dir], which defines the settings\
25
-to test, is not present."
26
- test_cleanup_then_return
24
+ test_skip "The source directory [get_source_dir], which defines the\
25
+settings to test, is not present."
2726
}
2827
2928
test_setup
3029
3130
###############################################################################
3231
--- test/settings.test
+++ test/settings.test
@@ -19,13 +19,12 @@
19 #
20
21 set path [file dirname [info script]]
22
23 if {![file isdirectory [get_source_dir]]} {
24 puts "The source directory [get_source_dir], which defines the settings\
25 to test, is not present."
26 test_cleanup_then_return
27 }
28
29 test_setup
30
31 ###############################################################################
32
--- test/settings.test
+++ test/settings.test
@@ -19,13 +19,12 @@
19 #
20
21 set path [file dirname [info script]]
22
23 if {![file isdirectory [get_source_dir]]} {
24 test_skip "The source directory [get_source_dir], which defines the\
25 settings to test, is not present."
 
26 }
27
28 test_setup
29
30 ###############################################################################
31
--- test/symlinks.test
+++ test/symlinks.test
@@ -19,12 +19,11 @@
1919
#
2020
2121
set path [file dirname [info script]]
2222
2323
if {$is_windows} {
24
- puts "Symlinks are not supported on Windows."
25
- test_cleanup_then_return
24
+ test_skip "Symlinks are not supported on Windows."
2625
}
2726
2827
require_no_open_checkout
2928
3029
###############################################################################
@@ -36,12 +35,12 @@
3635
3736
fossil test-th-eval --open-config {repository}
3837
set repository [normalize_result]
3938
4039
if {[string length $repository] == 0} {
41
- puts "Detection of the open repository file failed."
42
- test_cleanup_then_return
40
+ test_fail_then_return symlinks-repository \
41
+ "Detection of the open repository file failed."
4342
}
4443
4544
#######################################
4645
# Use symbolic link to a directory... #
4746
#######################################
4847
--- test/symlinks.test
+++ test/symlinks.test
@@ -19,12 +19,11 @@
19 #
20
21 set path [file dirname [info script]]
22
23 if {$is_windows} {
24 puts "Symlinks are not supported on Windows."
25 test_cleanup_then_return
26 }
27
28 require_no_open_checkout
29
30 ###############################################################################
@@ -36,12 +35,12 @@
36
37 fossil test-th-eval --open-config {repository}
38 set repository [normalize_result]
39
40 if {[string length $repository] == 0} {
41 puts "Detection of the open repository file failed."
42 test_cleanup_then_return
43 }
44
45 #######################################
46 # Use symbolic link to a directory... #
47 #######################################
48
--- test/symlinks.test
+++ test/symlinks.test
@@ -19,12 +19,11 @@
19 #
20
21 set path [file dirname [info script]]
22
23 if {$is_windows} {
24 test_skip "Symlinks are not supported on Windows."
 
25 }
26
27 require_no_open_checkout
28
29 ###############################################################################
@@ -36,12 +35,12 @@
35
36 fossil test-th-eval --open-config {repository}
37 set repository [normalize_result]
38
39 if {[string length $repository] == 0} {
40 test_fail_then_return symlinks-repository \
41 "Detection of the open repository file failed."
42 }
43
44 #######################################
45 # Use symbolic link to a directory... #
46 #######################################
47
+22 -5
--- test/tester.tcl
+++ test/tester.tcl
@@ -377,12 +377,10 @@
377377
$::env(FOSSIL_TEST_DANGEROUS_IGNORE_OPEN_CHECKOUT) eq "YES_DO_IT"} {
378378
return
379379
}
380380
catch {exec $::fossilexe info} res
381381
if {[regexp {local-root:} $res]} {
382
- global skipped_tests testfile
383
- lappend skipped_tests $testfile
384382
set projectName <unknown>
385383
set localRoot <unknown>
386384
regexp -line -- {^project-name: (.*)$} $res dummy projectName
387385
set projectName [string trim $projectName]
388386
regexp -line -- {^local-root: (.*)$} $res dummy localRoot
@@ -415,13 +413,29 @@
415413
after [expr {$try * 100}]
416414
}
417415
error "Could not delete \"$path\", error: $error"
418416
}
419417
420
-proc test_cleanup_then_return {} {
418
+# Skip the rest of the current test file because of REASON, which the
419
+# final summary reports beside the file name. Call it from the top
420
+# level of a test file.
421
+#
422
+proc test_skip {reason} {
421423
global skipped_tests testfile
422
- lappend skipped_tests $testfile
424
+ lappend skipped_tests [list $testfile $reason]
425
+ protOut "SKIPPED $testfile: $reason" 1
426
+ uplevel 1 [list test_cleanup]
427
+ return -code return
428
+}
429
+
430
+# Record test NAME as failed because of REASON, then stop the current
431
+# test file. Call it from the top level of a test file when a step
432
+# that the rest of the file depends on has failed.
433
+#
434
+proc test_fail_then_return {name reason} {
435
+ test $name 0
436
+ protOut "$name: $reason" 1
423437
uplevel 1 [list test_cleanup]
424438
return -code return
425439
}
426440
427441
proc test_cleanup {} {
@@ -1082,10 +1096,13 @@
10821096
if {$nErr>0} {
10831097
protOut "***** Ignored failures: $ignored_test" 1
10841098
}
10851099
set nSkipped [llength $skipped_tests]
10861100
if {$nSkipped>0} {
1087
- protOut "***** Skipped tests: $skipped_tests" 1
1101
+ protOut "***** Skipped tests: [lmap s $skipped_tests {lindex $s 0}]" 1
1102
+ foreach s $skipped_tests {
1103
+ protOut "***** [lindex $s 0]: [lindex $s 1]" 1
1104
+ }
10881105
}
10891106
if {$bad_test>0} {
10901107
exit 1
10911108
}
10921109
--- test/tester.tcl
+++ test/tester.tcl
@@ -377,12 +377,10 @@
377 $::env(FOSSIL_TEST_DANGEROUS_IGNORE_OPEN_CHECKOUT) eq "YES_DO_IT"} {
378 return
379 }
380 catch {exec $::fossilexe info} res
381 if {[regexp {local-root:} $res]} {
382 global skipped_tests testfile
383 lappend skipped_tests $testfile
384 set projectName <unknown>
385 set localRoot <unknown>
386 regexp -line -- {^project-name: (.*)$} $res dummy projectName
387 set projectName [string trim $projectName]
388 regexp -line -- {^local-root: (.*)$} $res dummy localRoot
@@ -415,13 +413,29 @@
415 after [expr {$try * 100}]
416 }
417 error "Could not delete \"$path\", error: $error"
418 }
419
420 proc test_cleanup_then_return {} {
 
 
 
 
421 global skipped_tests testfile
422 lappend skipped_tests $testfile
 
 
 
 
 
 
 
 
 
 
 
 
423 uplevel 1 [list test_cleanup]
424 return -code return
425 }
426
427 proc test_cleanup {} {
@@ -1082,10 +1096,13 @@
1082 if {$nErr>0} {
1083 protOut "***** Ignored failures: $ignored_test" 1
1084 }
1085 set nSkipped [llength $skipped_tests]
1086 if {$nSkipped>0} {
1087 protOut "***** Skipped tests: $skipped_tests" 1
 
 
 
1088 }
1089 if {$bad_test>0} {
1090 exit 1
1091 }
1092
--- test/tester.tcl
+++ test/tester.tcl
@@ -377,12 +377,10 @@
377 $::env(FOSSIL_TEST_DANGEROUS_IGNORE_OPEN_CHECKOUT) eq "YES_DO_IT"} {
378 return
379 }
380 catch {exec $::fossilexe info} res
381 if {[regexp {local-root:} $res]} {
 
 
382 set projectName <unknown>
383 set localRoot <unknown>
384 regexp -line -- {^project-name: (.*)$} $res dummy projectName
385 set projectName [string trim $projectName]
386 regexp -line -- {^local-root: (.*)$} $res dummy localRoot
@@ -415,13 +413,29 @@
413 after [expr {$try * 100}]
414 }
415 error "Could not delete \"$path\", error: $error"
416 }
417
418 # Skip the rest of the current test file because of REASON, which the
419 # final summary reports beside the file name. Call it from the top
420 # level of a test file.
421 #
422 proc test_skip {reason} {
423 global skipped_tests testfile
424 lappend skipped_tests [list $testfile $reason]
425 protOut "SKIPPED $testfile: $reason" 1
426 uplevel 1 [list test_cleanup]
427 return -code return
428 }
429
430 # Record test NAME as failed because of REASON, then stop the current
431 # test file. Call it from the top level of a test file when a step
432 # that the rest of the file depends on has failed.
433 #
434 proc test_fail_then_return {name reason} {
435 test $name 0
436 protOut "$name: $reason" 1
437 uplevel 1 [list test_cleanup]
438 return -code return
439 }
440
441 proc test_cleanup {} {
@@ -1082,10 +1096,13 @@
1096 if {$nErr>0} {
1097 protOut "***** Ignored failures: $ignored_test" 1
1098 }
1099 set nSkipped [llength $skipped_tests]
1100 if {$nSkipped>0} {
1101 protOut "***** Skipped tests: [lmap s $skipped_tests {lindex $s 0}]" 1
1102 foreach s $skipped_tests {
1103 protOut "***** [lindex $s 0]: [lindex $s 1]" 1
1104 }
1105 }
1106 if {$bad_test>0} {
1107 exit 1
1108 }
1109
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -19,19 +19,17 @@
1919
#
2020
2121
fossil test-th-eval "hasfeature th1Docs"
2222
2323
if {[normalize_result] ne "1"} {
24
- puts "Fossil was not compiled with TH1 docs support."
25
- test_cleanup_then_return
24
+ test_skip "Fossil was not compiled with TH1 docs support."
2625
}
2726
2827
fossil test-th-eval "hasfeature tcl"
2928
3029
if {[normalize_result] ne "1"} {
31
- puts "Fossil was not compiled with Tcl support."
32
- test_cleanup_then_return
30
+ test_skip "Fossil was not compiled with Tcl support."
3331
}
3432
3533
###############################################################################
3634
3735
test_setup
3836
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -19,19 +19,17 @@
19 #
20
21 fossil test-th-eval "hasfeature th1Docs"
22
23 if {[normalize_result] ne "1"} {
24 puts "Fossil was not compiled with TH1 docs support."
25 test_cleanup_then_return
26 }
27
28 fossil test-th-eval "hasfeature tcl"
29
30 if {[normalize_result] ne "1"} {
31 puts "Fossil was not compiled with Tcl support."
32 test_cleanup_then_return
33 }
34
35 ###############################################################################
36
37 test_setup
38
--- test/th1-docs.test
+++ test/th1-docs.test
@@ -19,19 +19,17 @@
19 #
20
21 fossil test-th-eval "hasfeature th1Docs"
22
23 if {[normalize_result] ne "1"} {
24 test_skip "Fossil was not compiled with TH1 docs support."
 
25 }
26
27 fossil test-th-eval "hasfeature tcl"
28
29 if {[normalize_result] ne "1"} {
30 test_skip "Fossil was not compiled with Tcl support."
 
31 }
32
33 ###############################################################################
34
35 test_setup
36
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -19,12 +19,11 @@
1919
#
2020
2121
fossil test-th-eval "hasfeature th1Hooks"
2222
2323
if {[normalize_result] ne "1"} {
24
- puts "Fossil was not compiled with TH1 hooks support."
25
- test_cleanup_then_return
24
+ test_skip "Fossil was not compiled with TH1 hooks support."
2625
}
2726
2827
###############################################################################
2928
3029
test_setup
3130
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -19,12 +19,11 @@
19 #
20
21 fossil test-th-eval "hasfeature th1Hooks"
22
23 if {[normalize_result] ne "1"} {
24 puts "Fossil was not compiled with TH1 hooks support."
25 test_cleanup_then_return
26 }
27
28 ###############################################################################
29
30 test_setup
31
--- test/th1-hooks.test
+++ test/th1-hooks.test
@@ -19,12 +19,11 @@
19 #
20
21 fossil test-th-eval "hasfeature th1Hooks"
22
23 if {[normalize_result] ne "1"} {
24 test_skip "Fossil was not compiled with TH1 hooks support."
 
25 }
26
27 ###############################################################################
28
29 test_setup
30
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -23,12 +23,11 @@
2323
###############################################################################
2424
2525
fossil test-th-eval "hasfeature tcl"
2626
2727
if {[normalize_result] ne "1"} {
28
- puts "Fossil was not compiled with Tcl support."
29
- test_cleanup_then_return
28
+ test_skip "Fossil was not compiled with Tcl support."
3029
}
3130
3231
###############################################################################
3332
3433
test_setup
3534
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -23,12 +23,11 @@
23 ###############################################################################
24
25 fossil test-th-eval "hasfeature tcl"
26
27 if {[normalize_result] ne "1"} {
28 puts "Fossil was not compiled with Tcl support."
29 test_cleanup_then_return
30 }
31
32 ###############################################################################
33
34 test_setup
35
--- test/th1-tcl.test
+++ test/th1-tcl.test
@@ -23,12 +23,11 @@
23 ###############################################################################
24
25 fossil test-th-eval "hasfeature tcl"
26
27 if {[normalize_result] ne "1"} {
28 test_skip "Fossil was not compiled with Tcl support."
 
29 }
30
31 ###############################################################################
32
33 test_setup
34
--- test/unversioned.test
+++ test/unversioned.test
@@ -19,12 +19,11 @@
1919
#
2020
2121
set path [file dirname [info script]]
2222
2323
if {[catch {package require sha1}] != 0} {
24
- puts "The \"sha1\" package is not available."
25
- test_cleanup_then_return
24
+ test_skip "The \"sha1\" package for Tcl is not available."
2625
}
2726
2827
require_no_open_checkout
2928
3029
test_setup; set rootDir [file normalize [pwd]]
@@ -34,12 +33,12 @@
3433
3534
fossil test-th-eval --open-config {repository}
3635
set repository [normalize_result]
3736
3837
if {[string length $repository] == 0} {
39
- puts "Detection of the open repository file failed."
40
- test_cleanup_then_return
38
+ test_fail_then_return unversioned-repository \
39
+ "Detection of the open repository file failed."
4140
}
4241
4342
write_file unversioned1.txt "This is unversioned file #1."
4443
write_file unversioned2.txt " This is unversioned file #2. "
4544
write_file "unversioned space.txt" "\nThis is unversioned file #3.\n"
4645
--- test/unversioned.test
+++ test/unversioned.test
@@ -19,12 +19,11 @@
19 #
20
21 set path [file dirname [info script]]
22
23 if {[catch {package require sha1}] != 0} {
24 puts "The \"sha1\" package is not available."
25 test_cleanup_then_return
26 }
27
28 require_no_open_checkout
29
30 test_setup; set rootDir [file normalize [pwd]]
@@ -34,12 +33,12 @@
34
35 fossil test-th-eval --open-config {repository}
36 set repository [normalize_result]
37
38 if {[string length $repository] == 0} {
39 puts "Detection of the open repository file failed."
40 test_cleanup_then_return
41 }
42
43 write_file unversioned1.txt "This is unversioned file #1."
44 write_file unversioned2.txt " This is unversioned file #2. "
45 write_file "unversioned space.txt" "\nThis is unversioned file #3.\n"
46
--- test/unversioned.test
+++ test/unversioned.test
@@ -19,12 +19,11 @@
19 #
20
21 set path [file dirname [info script]]
22
23 if {[catch {package require sha1}] != 0} {
24 test_skip "The \"sha1\" package for Tcl is not available."
 
25 }
26
27 require_no_open_checkout
28
29 test_setup; set rootDir [file normalize [pwd]]
@@ -34,12 +33,12 @@
33
34 fossil test-th-eval --open-config {repository}
35 set repository [normalize_result]
36
37 if {[string length $repository] == 0} {
38 test_fail_then_return unversioned-repository \
39 "Detection of the open repository file failed."
40 }
41
42 write_file unversioned1.txt "This is unversioned file #1."
43 write_file unversioned2.txt " This is unversioned file #2. "
44 write_file "unversioned space.txt" "\nThis is unversioned file #3.\n"
45

Keyboard Shortcuts

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