Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

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

  1. icomment:
    And I forgot to add:
    
    (a) In order to work in the install environment the test script must also try 'package require' at some point to force the pkgIndex.tcl to load.
    
    (b) The order of attempts _must_ be: (i) static extension; (ii) ddelib/reglib; (iii) package.  This is to prevent accidental loading of a dll from some location other than the one specified by the test script.
    
    (c) clock.test appears to do the right thing (tests pass in build and install environments) by using the following logic:
    
        if {[catch {package require registry 1.1}] 
    && [catch {load {} Registry}]
    && [catch {
        ::tcltest::loadTestedCommands
        load $::reglib Registry
    }]} {
    namespace eval ::tcl::clock {variable NoRegistry {}}
        }
    
    This could end up loading the wrong dll though, and which it works for tests involving register it doesn't help with windde.test which uses $ddelib to load directly into slave interps.
    
    (d) Proposed change (in all locations using ddelib and/or reglib):
    
      if { [catch { load {} Register }]
      && [catch { ::tcltest::loadTestedCommands ; load $::reglib Registry }]
      && [catch { pacakge require registry }] } {
      # extension absent
    }
    
    This will still need the 'package require' to set up a var (like ::ddelib) to indicate the actual DLL.
    
    
  2. login: "twylite"
  3. mimetype: "text/plain"
  4. username: "twylite"