Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 236aaab0c1f5c720e668772967aa80878949ee21
Ticket: 3ed219955f21fb674be4616bf226e3d4272c20fa
tcltest -relateddir does not work
User & Date: anonymous on 2015-04-18 20:34:49
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    tcltest's -relateddir does not function correctly.
    Using the script below on linux to set up a test directory and then running all.tcl, only the top level test and the test in the d.d/ directory run.  The a.d/, b.d/ and c.d/ directories are completely bypassed.
    
    #!/bin/sh
    
    mkall () {
    echo "all:$*"
      dir=$1
      n=$2
    
    cat > ${dir}/all.tcl << _HERE_
    #!/usr/bin/tclsh
    
    package require Tcl 8.6
    package require tcltest 2.2
    
    set testdir [file dirname [file normalize [info script]]]
    
    ::tcltest::configure -testdir \$testdir
    ::tcltest::configure -verbose {line error start}
    ::tcltest::configure -relateddir {*.d}
    
    ::tcltest::runAllTests
    exit
    _HERE_
    chmod a+rx ${dir}/all.tcl
    
    }
    
    mktest () {
    echo "test:$*"
      dir=$1
      n=$2
    
    cat > ${dir}/${n}.test << _HERE_
    #!/usr/bin/tclsh
    #
    
    package require tcltest 2.2
    namespace import -force tcltest::*
    ::tcltest::configure -verbose {start skip line error}
    
    namespace eval ::sometests::test {
      test test-${n} {test-${n}} -body {
        set rc true
      } -result true
    
      cleanupTests
    }
    namespace delete ::sometests::test
    _HERE_
    chmod a+rx ${dir}/${n}.test
    
    }
    
    mkdir z
    for d in . a.d b.d c.d d.d; do
      test -d z/$d || mkdir z/$d
      nm=`echo $d | sed 's/\.d//'`
      if [ $d = . ]; then
        nm=top
      fi
      mkall z/$d $nm
      mktest z/$d $nm
    done
    
  5. foundin changed to: "8.6.1"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "e755306c9ef019bc4ca35d69adcf001dece786ff"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "34. tcltest Package"
  15. title changed to: "tcltest -relateddir does not work"
  16. type changed to: "Bug"