Fossil SCM

Before starting tests, switch to tempHomePath. This avoids require_no_open_checkout errors if you start the test inside a checkout (actual tests are done in a temporary repository/checkout anyway).

preben 2023-12-11 21:23 testing-improvements
Commit 381f1ecbf55b68e832466cc24a9de62b5fa267835f4541b0f4cd3d444525a91f
1 file changed +6
--- test/tester.tcl
+++ test/tester.tcl
@@ -1089,10 +1089,15 @@
10891089
}
10901090
10911091
10921092
protInit $fossilexe
10931093
set ::tempKeepHome 1
1094
+
1095
+# Start in tempHomePath to help avoid errors with require_no_open_checkout
1096
+set startPwd [pwd]
1097
+cd $tempHomePath
1098
+
10941099
foreach testfile $argv {
10951100
protOut "***** $testfile ******"
10961101
if { [catch {source $testdir/$testfile.test} testerror testopts] } {
10971102
test test-framework-$testfile 0
10981103
protOut "!!!!! $testfile: $testerror"
@@ -1100,10 +1105,11 @@
11001105
} else {
11011106
test test-framework-$testfile 1
11021107
}
11031108
protOut "***** End of $testfile: [llength $bad_test] errors so far ******"
11041109
}
1110
+cd $startPwd
11051111
unset ::tempKeepHome; delete_temporary_home
11061112
set nErr [llength $bad_test]
11071113
if {$nErr>0 || !$::QUIET} {
11081114
protOut "***** Final results: $nErr errors out of $test_count tests" 1
11091115
}
11101116
--- test/tester.tcl
+++ test/tester.tcl
@@ -1089,10 +1089,15 @@
1089 }
1090
1091
1092 protInit $fossilexe
1093 set ::tempKeepHome 1
 
 
 
 
 
1094 foreach testfile $argv {
1095 protOut "***** $testfile ******"
1096 if { [catch {source $testdir/$testfile.test} testerror testopts] } {
1097 test test-framework-$testfile 0
1098 protOut "!!!!! $testfile: $testerror"
@@ -1100,10 +1105,11 @@
1100 } else {
1101 test test-framework-$testfile 1
1102 }
1103 protOut "***** End of $testfile: [llength $bad_test] errors so far ******"
1104 }
 
1105 unset ::tempKeepHome; delete_temporary_home
1106 set nErr [llength $bad_test]
1107 if {$nErr>0 || !$::QUIET} {
1108 protOut "***** Final results: $nErr errors out of $test_count tests" 1
1109 }
1110
--- test/tester.tcl
+++ test/tester.tcl
@@ -1089,10 +1089,15 @@
1089 }
1090
1091
1092 protInit $fossilexe
1093 set ::tempKeepHome 1
1094
1095 # Start in tempHomePath to help avoid errors with require_no_open_checkout
1096 set startPwd [pwd]
1097 cd $tempHomePath
1098
1099 foreach testfile $argv {
1100 protOut "***** $testfile ******"
1101 if { [catch {source $testdir/$testfile.test} testerror testopts] } {
1102 test test-framework-$testfile 0
1103 protOut "!!!!! $testfile: $testerror"
@@ -1100,10 +1105,11 @@
1105 } else {
1106 test test-framework-$testfile 1
1107 }
1108 protOut "***** End of $testfile: [llength $bad_test] errors so far ******"
1109 }
1110 cd $startPwd
1111 unset ::tempKeepHome; delete_temporary_home
1112 set nErr [llength $bad_test]
1113 if {$nErr>0 || !$::QUIET} {
1114 protOut "***** Final results: $nErr errors out of $test_count tests" 1
1115 }
1116

Keyboard Shortcuts

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