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).
Commit
381f1ecbf55b68e832466cc24a9de62b5fa267835f4541b0f4cd3d444525a91f
Parent
f1f5c4ce1e5c069…
1 file changed
+6
+6
| --- test/tester.tcl | ||
| +++ test/tester.tcl | ||
| @@ -1089,10 +1089,15 @@ | ||
| 1089 | 1089 | } |
| 1090 | 1090 | |
| 1091 | 1091 | |
| 1092 | 1092 | protInit $fossilexe |
| 1093 | 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 | + | |
| 1094 | 1099 | foreach testfile $argv { |
| 1095 | 1100 | protOut "***** $testfile ******" |
| 1096 | 1101 | if { [catch {source $testdir/$testfile.test} testerror testopts] } { |
| 1097 | 1102 | test test-framework-$testfile 0 |
| 1098 | 1103 | protOut "!!!!! $testfile: $testerror" |
| @@ -1100,10 +1105,11 @@ | ||
| 1100 | 1105 | } else { |
| 1101 | 1106 | test test-framework-$testfile 1 |
| 1102 | 1107 | } |
| 1103 | 1108 | protOut "***** End of $testfile: [llength $bad_test] errors so far ******" |
| 1104 | 1109 | } |
| 1110 | +cd $startPwd | |
| 1105 | 1111 | unset ::tempKeepHome; delete_temporary_home |
| 1106 | 1112 | set nErr [llength $bad_test] |
| 1107 | 1113 | if {$nErr>0 || !$::QUIET} { |
| 1108 | 1114 | protOut "***** Final results: $nErr errors out of $test_count tests" 1 |
| 1109 | 1115 | } |
| 1110 | 1116 |
| --- 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 |