Index: test/merge5.test ================================================================== --- test/merge5.test +++ test/merge5.test @@ -41,14 +41,10 @@ catch {exec $::fossilexe info} res if {![regexp {use --repository} $res]} { puts stderr "Cannot run this test within an open checkout" return } -# -# Fossil will write data on $HOME, running 'fossil open' here. -# We need not to clutter the $HOME of the test caller. -set env(HOME) [pwd] # Construct a test repository # exec $::fossilexe sqlite3 --no-repository m5.fossil <$testdir/${testfile}_repo.sql fossil rebuild m5.fossil Index: test/tester.tcl ================================================================== --- test/tester.tcl +++ test/tester.tcl @@ -192,21 +192,10 @@ } # Create and open a new Fossil repository and clean the checkout # proc repo_init {{filename ".rep.fossil"}} { - if {$::env(HOME) ne [pwd]} { - catch {exec $::fossilexe info} res - if {![regexp {use --repository} $res]} { - error "In an open checkout: cannot initialize a new repository here." - } - # Fossil will write data on $FOSSIL_HOME, running 'fossil new' here. - # We need not to clutter the $HOME of the test caller. - # - set ::env(FOSSIL_HOME) [pwd] - set ::env(HOME) [pwd] - } catch {exec $::fossilexe close -f} file delete $filename exec $::fossilexe new $filename exec $::fossilexe open $filename exec $::fossilexe clean -f @@ -521,10 +510,14 @@ set dir [file root [file tail $testfile]] file delete -force $dir file mkdir $dir set origwd [pwd] cd $dir + # FOSSIL_HOME overrides the location of the configuration database. Set this + # here so as not to pollute the user's normal settings and repository lists. + # Done before every test in case it gets modified. + set env(FOSSIL_HOME) $origwd protOut "***** $testfile ******" source $testdir/$testfile.test protOut "***** End of $testfile: [llength $bad_test] errors so far ******" cd $origwd }