Overview
| Artifact ID: | e3ad46ab2dadd7fc7222e8b58e95194b0a06f17e6514f7a270c41dae854bd948 |
|---|---|
| Ticket: | 9d579f145034b21ab250dcd808c78764fd40ac1b
Incorrect handling of test constraints |
| User & Date: | erikleunissen on 2017-12-09 22:26:26 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
Some test constraints are handled incorrectly, letting tests being run when they should not and conversely. This behaviour appears to depend on certain characters being present in the name of the constraint. The attached Tcl script "testconstraints.tcl" exercises the incorrect behaviour for two cases. Expected behaviour: test foo is skipped and test bar is run. Observed behaviour: test foo is run and test bar is skipped. > cat testconstraints.tcl #! /bin/sh # If executed as a shell script, the next line replaces the shell with wish \ exec tclsh "$0" ${1+"$@"} puts "tcltest version: [package require tcltest]" namespace import tcltest::* tcltest::configure -verbose {pass error} testConstraint tcl>=11.1 [expr {$tcl_version >= 11.1}] testConstraint abc-def-ghi 1 # This test ought be skipped test foo {foo} -constraints {tcl>=11.1} -body { # no need to do anything here } -result "" # This test ought be run test bar {bar} -constraints {abc-def-ghi} -body { # no need to do anything here } -result "" tcltest::cleanupTests > tclsh8.5 testconstraints.tcl tcltest version: 2.4.1 ++++ foo PASSED testconstraints.tcl: Total 2 Passed 1 Skipped 1 Failed 0 Number of tests skipped for each constraint: 1 abc-def-ghi > The attached patch corrects the behaviour: > tclsh8.5 testconstraints.tcl tcltest version: 2.4.1 ++++ bar PASSED testconstraints.tcl: Total 2 Passed 1 Skipped 1 Failed 0 Number of tests skipped for each constraint: 1 tcl>=11.1 > Sincerely, Erik Leunissen -- - foundin changed to: "tcltest 2.4.1"
- is_private changed to: "0"
- login: "erikleunissen"
- priority changed to: "5 Medium"
- private_contact changed to: "609f4c7ecf7dbb7a46acdc7eb164753d196088a6"
- resolution changed to: "None"
- severity changed to: "Important"
- status changed to: "Open"
- submitter changed to: "erikleunissen"
- subsystem changed to: "34. tcltest Package"
- title changed to: "Incorrect handling of test constraints"
- type changed to: "Bug"