Fossil

Check-in [2ada5ec7]
Login

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

Overview
Comment:Merge the new knownBug constraint support from trunk.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | rberteig-json-test
Files: files | file ages | folders
SHA1:2ada5ec76e630c85c85d4e14153aa50f7ec628bc
User & Date: rberteig 2016-01-27 02:29:24
Context
2016-01-28
01:19
Refactoring in the json tests. Add coverage of /json/wiki. Note discrepency between documentation and execution of /json/wiki/diff. check-in: cb611ffc user: rberteig tags: rberteig-json-test
2016-01-27
02:29
Merge the new knownBug constraint support from trunk. check-in: 2ada5ec7 user: rberteig tags: rberteig-json-test
02:14
Marked invocations of fossil that are expected to return a non-zero status with the -expectError flag in the amend, clean, and merge5 test files. This makes tester.tcl -quiet be truely quiet for those files when all tests are passing. Deliberately did not mark the invocation in merge6.test which foreshadows the failure of the merge_multi-4 test, as it is not clear to me whether the bug is in the test case or in fossil. check-in: 62f59956 user: rberteig tags: rberteig-json-test
01:55
Revise test result summary to include 'ignored' results from tests marked with 'knownBug'. check-in: f77fbed8 user: mistachkin tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to test/merge6.test.

60
61
62
63
64
65
66
67
fossil merge branch_for_f3_f4
fossil commit -m "new trunk files f2, f3, and f4 via merge"
fossil ls

test merge_multi-4 {[normalize_result] eq {f1
f2
f3
f4}}







|
60
61
62
63
64
65
66
67
fossil merge branch_for_f3_f4
fossil commit -m "new trunk files f2, f3, and f4 via merge"
fossil ls

test merge_multi-4 {[normalize_result] eq {f1
f2
f3
f4}} knownBug

Changes to test/merge_renames.test.

154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
...
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
        set deletes [expr $deletes + 1]
    }
}

if {$deletes!=0} {
    # failed
    protOut "Error, the merge should not delete any file"
    test merge_renames-2 0
} else {
    test merge_renames-2 1
}

######################################
#  Test 4                            #
#  Reported: Ticket [67176c3aa4]     #
######################################

................................................................................
fossil merge trunk
fossil commit -m "trunk merged, should have 3 files"

fossil ls

test merge_renames-5 {[normalize_result] eq {f1
f2
f3}}

######################################
#
# Tests for troubles not specifically linked with renames but that I'd like to
# write:
#  [c26c63eb1b] - 'merge --backout' does not handle conflicts properly
#  [953031915f] - Lack of warning when overwriting extra files
#  [4df5f38f1e] - Troubles merging a file delete with a file change







|

|







 







|








154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
...
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
        set deletes [expr $deletes + 1]
    }
}

if {$deletes!=0} {
    # failed
    protOut "Error, the merge should not delete any file"
    test merge_renames-3 0
} else {
    test merge_renames-3 1
}

######################################
#  Test 4                            #
#  Reported: Ticket [67176c3aa4]     #
######################################

................................................................................
fossil merge trunk
fossil commit -m "trunk merged, should have 3 files"

fossil ls

test merge_renames-5 {[normalize_result] eq {f1
f2
f3}} knownBug

######################################
#
# Tests for troubles not specifically linked with renames but that I'd like to
# write:
#  [c26c63eb1b] - 'merge --backout' does not handle conflicts properly
#  [953031915f] - Lack of warning when overwriting extra files
#  [4df5f38f1e] - Troubles merging a file delete with a file change

Changes to test/tester.tcl.

56
57
58
59
60
61
62








63
64
65
66
67
68
69
...
330
331
332
333
334
335
336
337
338
339

340
341



342

343




344
345
346
347

348
349
350

351
352
353
354
355
356
357
...
497
498
499
500
501
502
503
504
505
506
507
508







set i [lsearch $argv -quiet]
if {$i>=0} {
  set QUIET 1
  set argv [lreplace $argv $i $i]
} else {
  set QUIET 0
}









if {[llength $argv]==0} {
  foreach f [lsort [glob $testdir/*.test]] {
    set base [file root [file tail $f]]
    lappend argv $base
  }
}
................................................................................
    file delete $newFileName
  }
}

# Perform a test
#
set test_count 0
proc test {name expr} {
  global bad_test test_count RESULT
  incr test_count

  set r [uplevel 1 [list expr $expr]]
  if {$r} {



    protOut "test $name OK"

  } else {




    protOut "test $name FAILED!" 1
    if {$::QUIET} {protOut "RESULT: $RESULT" 1}
    lappend bad_test $name
    if {$::HALT} exit

  }
}
set bad_test {}


# Return a random string N characters long.
#
set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
append vocabulary "       ()*^!.eeeeeeeeaaaaattiioo   "
set nvocabulary [string length $vocabulary]
proc rand_str {N} {
................................................................................
  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} {
  protOut "***** Final result: $nErr errors out of $test_count tests" 1
}
if {$nErr>0} {
  protOut "***** Failures: $bad_test" 1
}














>
>
>
>
>
>
>
>







 







|
|

>


>
>
>
|
>

>
>
>
>
|
|
|
|
>



>







 







|


|

>
>
>
>
>
>
>
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
...
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
...
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
set i [lsearch $argv -quiet]
if {$i>=0} {
  set QUIET 1
  set argv [lreplace $argv $i $i]
} else {
  set QUIET 0
}

set i [lsearch $argv -strict]
if {$i>=0} {
  set STRICT 1
  set argv [lreplace $argv $i $i]
} else {
  set STRICT 0
}

if {[llength $argv]==0} {
  foreach f [lsort [glob $testdir/*.test]] {
    set base [file root [file tail $f]]
    lappend argv $base
  }
}
................................................................................
    file delete $newFileName
  }
}

# Perform a test
#
set test_count 0
proc test {name expr {constraints ""}} {
  global bad_test ignored_test test_count RESULT
  incr test_count
  set knownBug [expr {"knownBug" in $constraints}]
  set r [uplevel 1 [list expr $expr]]
  if {$r} {
    if {$knownBug && !$::STRICT} {
      protOut "test $name OK (knownBug)?"
    } else {
      protOut "test $name OK"
    }
  } else {
    if {$knownBug && !$::STRICT} {
      protOut "test $name FAILED (knownBug)!" 1
      lappend ignored_test $name
    } else {
      protOut "test $name FAILED!" 1
      if {$::QUIET} {protOut "RESULT: $RESULT" 1}
      lappend bad_test $name
      if {$::HALT} exit
    }
  }
}
set bad_test {}
set ignored_test {}

# Return a random string N characters long.
#
set vocabulary 01234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
append vocabulary "       ()*^!.eeeeeeeeaaaaattiioo   "
set nvocabulary [string length $vocabulary]
proc rand_str {N} {
................................................................................
  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} {
  protOut "***** Final results: $nErr errors out of $test_count tests" 1
}
if {$nErr>0} {
  protOut "***** Considered failures: $bad_test" 1
}
set nErr [llength $ignored_test]
if {$nErr>0 || !$::QUIET} {
  protOut "***** Ignored results: $nErr ignored errors out of $test_count tests" 1
}
if {$nErr>0} {
  protOut "***** Ignored failures: $ignored_test" 1
}