Fossil SCM

Switch out of temporary test repos to avoid require_no_open_checkout errors when using -keep.

preben 2023-11-17 17:36 testing-improvements
Commit 41f7e90c84d5b950fef2644b7ae1d22bafbdd29bf0a203b43c31b72efd6d3128
1 file changed +5 -1
+5 -1
--- test/tester.tcl
+++ test/tester.tcl
@@ -475,11 +475,15 @@
475475
uplevel 1 [list test_cleanup]
476476
return -code return
477477
}
478478
479479
proc test_cleanup {} {
480
- if {$::KEEP} {return}; # All cleanup disabled?
480
+ if {$::KEEP} {
481
+ # To avoid errors with require_no_open_checkout, cd out of here.
482
+ if {[info exists ::tempSavedPwd]} {cd $::tempSavedPwd; unset ::tempSavedPwd}
483
+ return
484
+ }
481485
if {![info exists ::tempRepoPath]} {return}
482486
if {![file exists $::tempRepoPath]} {return}
483487
if {![file isdirectory $::tempRepoPath]} {return}
484488
set tempPathEnd [expr {[string length $::tempPath] - 1}]
485489
if {[string length $::tempPath] == 0 || \
486490
--- test/tester.tcl
+++ test/tester.tcl
@@ -475,11 +475,15 @@
475 uplevel 1 [list test_cleanup]
476 return -code return
477 }
478
479 proc test_cleanup {} {
480 if {$::KEEP} {return}; # All cleanup disabled?
 
 
 
 
481 if {![info exists ::tempRepoPath]} {return}
482 if {![file exists $::tempRepoPath]} {return}
483 if {![file isdirectory $::tempRepoPath]} {return}
484 set tempPathEnd [expr {[string length $::tempPath] - 1}]
485 if {[string length $::tempPath] == 0 || \
486
--- test/tester.tcl
+++ test/tester.tcl
@@ -475,11 +475,15 @@
475 uplevel 1 [list test_cleanup]
476 return -code return
477 }
478
479 proc test_cleanup {} {
480 if {$::KEEP} {
481 # To avoid errors with require_no_open_checkout, cd out of here.
482 if {[info exists ::tempSavedPwd]} {cd $::tempSavedPwd; unset ::tempSavedPwd}
483 return
484 }
485 if {![info exists ::tempRepoPath]} {return}
486 if {![file exists $::tempRepoPath]} {return}
487 if {![file isdirectory $::tempRepoPath]} {return}
488 set tempPathEnd [expr {[string length $::tempPath] - 1}]
489 if {[string length $::tempPath] == 0 || \
490

Keyboard Shortcuts

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