Fossil

Check-in [d4907f17]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Set the FOSSIL_HOME envvar before each test. Use the root test run directory instead of the directories created for each test file so the config DB file on Windows doesn't mess up tests of commands like addremove and extras.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | testCheckoutReform
Files: files | file ages | folders
SHA1: d4907f17fbaf46cc5135c5ae46ba331725a7ebee
User & Date: joel 2016-03-01 21:50:24.922
Context
2016-03-01
21:50
Set the FOSSIL_HOME envvar before each test. Use the root test run directory instead of the directories created for each test file so the config DB file on Windows doesn't mess up tests of commands like addremove and extras. ... (Closed-Leaf check-in: d4907f17 user: joel tags: testCheckoutReform)
16:32
Update referenced OpenSSL version. ... (check-in: a9e3db1f user: mistachkin tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to test/merge5.test.
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
}

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
fossil open m5.fossil
fossil user default drh --user drh







<
<
<
<







39
40
41
42
43
44
45




46
47
48
49
50
51
52
}

catch {exec $::fossilexe info} res
if {![regexp {use --repository} $res]} {
  puts stderr "Cannot run this test within an open checkout"
  return
}





# Construct a test repository
#
exec $::fossilexe sqlite3 --no-repository m5.fossil <$testdir/${testfile}_repo.sql
fossil rebuild m5.fossil
fossil open m5.fossil
fossil user default drh --user drh
Changes to test/tester.tcl.
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
  regsub -all { +\n} $y \n y
  return [expr {$x==$y}]
}

# 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
  exec $::fossilexe set mtime-changes off
}







<
<
<
<
<
<
<
<
<
<
<







190
191
192
193
194
195
196











197
198
199
200
201
202
203
  regsub -all { +\n} $y \n y
  return [expr {$x==$y}]
}

# Create and open a new Fossil repository and clean the checkout
#
proc repo_init {{filename ".rep.fossil"}} {











  catch {exec $::fossilexe close -f}
  file delete $filename
  exec $::fossilexe new $filename
  exec $::fossilexe open $filename
  exec $::fossilexe clean -f
  exec $::fossilexe set mtime-changes off
}
519
520
521
522
523
524
525




526
527
528
529
530
531
532
protInit $fossilexe
foreach testfile $argv {
  set dir [file root [file tail $testfile]]
  file delete -force $dir
  file mkdir $dir
  set origwd [pwd]
  cd $dir




  protOut "***** $testfile ******"
  source $testdir/$testfile.test
  protOut "***** End of $testfile: [llength $bad_test] errors so far ******"
  cd $origwd
}
set nErr [llength $bad_test]
if {$nErr>0 || !$::QUIET} {







>
>
>
>







508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
protInit $fossilexe
foreach testfile $argv {
  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
}
set nErr [llength $bad_test]
if {$nErr>0 || !$::QUIET} {