Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c166ef1905fdcea4bed22e681371d53f9a787001
Ticket: 3549770fffffffffffffffffffffffffffffffff
Multiple test failures running tcltest outside build tree
User & Date: twylite on 2012-07-30 21:45:34
Changes

  1. icomment:
    Hi.  The changes to filesystem.test in [c1dc55ad] fail in both build and install environments:
    
    - filesystem-7.1.1 in build: couldn't load library "simplefs:/./Release_VC10/tcldde14.dll": no such file or directory
    - filesystem-7.1.1 in install: can't read "::ddelib": no such variable
    
    Cause #1: no [package require] in .test, so [package versions] returns empty and subsequent logic generates an error, resulting in ddelib/reglib not being set.
    Cause #2: simplefs is rooted in [pwd], and both tests do 'cd [file dirname [info nameof]]', so the library must be relative to the Tcl shell.
    
    Proposed solution: apply the following diff (also attached as td-3549770-4.patch with CRLF eol):
    
    
    --- tests\fileSystem.test
    +++ tests\fileSystem.test
    @@ -17,17 +17,19 @@
            file delete -force link.file
            file delete -force dir.link
            file delete -force [file join dir.dir linkinside.file]
         }
    
    +testConstraint loaddll 0
     catch {
         ::tcltest::loadTestedCommands
         package require -exact Tcltest [info patchlevel]
    -    set ::ddever [lindex [lsort [package versions dde]] end]
    +    set ::ddever [package require dde]
         set ::ddelib [lindex [package ifneeded dde $::ddever] 1]
    -    set ::regver [lindex [lsort [package versions registry]] end]
    +    set ::regver [package require registry 1.3.0]
         set ::reglib [lindex [package ifneeded registry $::regver] 1]
    +    testConstraint loaddll 1
     }
    
     # Test for commands defined in Tcltest executable
     testConstraint testfilesystem              [llength [info commands ::testfilesystem]]
     testConstraint testsetplatform             [llength [info commands ::testsetplatform]]
    @@ -508,31 +510,31 @@
         while {![catch {testfilesystem 0}]} {}
     }
    
     test filesystem-7.1.1 {load from vfs} -setup {
         set dir [pwd]
    -} -constraints {win testsimplefilesystem} -body {
    +} -constraints {win testsimplefilesystem loaddll} -body {
         # This may cause a crash on exit
    -    cd [file dirname [info nameof]]
    +    cd [file dirname $::ddelib]
         testsimplefilesystem 1
         # This loads dde via a complex copy-to-temp operation
    -    load simplefs:/$::ddelib dde
    +    load simplefs:/[file tail $::ddelib] dde
         testsimplefilesystem 0
         return ok
         # The real result of this test is what happens when Tcl exits.
     } -cleanup {
         cd $dir
     } -result ok
     test filesystem-7.1.2 {load from vfs, and then unload again} -setup {
         set dir [pwd]
    -} -constraints {win testsimplefilesystem} -body {
    +} -constraints {win testsimplefilesystem loaddll} -body {
         # This may cause a crash on exit
    -    cd [file dirname [info nameof]]
    +    cd [file dirname $::reglib]
         testsimplefilesystem 1
         # This loads reg via a complex copy-to-temp operation
    -    load simplefs:/$::reglib Registry
    -    unload simplefs:/$::reglib
    +    load simplefs:/[file tail $::reglib] Registry
    +    unload simplefs:/[file tail $::reglib]
         testsimplefilesystem 0
         return ok
         # The real result of this test is what happens when Tcl exits.
     } -cleanup {
         cd $dir
    
    
    
  2. login: "twylite"
  3. mimetype: "text/plain"
  4. username: "twylite"