Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 5cf936adbe34cbec651958b5ec9631e259096924
Ticket: 219198ffffffffffffffffffffffffffffffffff
add sample Makefile target and all.tcl file for tcl tests to
User & Date: nobody on 2000-10-26 05:03:26
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2841 RFE
    Version: 8.2
    SubmitDate: '1999-09-20'
    LastModified: '2000-01-23'
    Severity: LOW
    Status: Assigned
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Other
    Machine: NA
    FixedDate: '2000-10-25'
    ClosedDate: '2000-10-25'
    
    
    Name:
    Andreas Kupries
    
    ReproducibleScript:
    THe following (in the patch section) is **no** patch, but a tcl script,
        a generalization of all.tcl to an application which is able to execute
        any testsuite, if called with the appropriate commandline flags.
        Requires the patch posted before (Tcltest enhancement). Enclosed a
        fragment of a Makefile using it:
    
        testshell=$(TCLSH_PROG) $(srcdir)/testshell
    
        test:
        $(testshell) -load 'load ./$(exampleA_LIB_FILE)'  -testdir $(srcdir)/tests
    
    Patch:
    #!/usr/local/bin/tclsh
    # -*- tcl -*-
    # Generic test application for all test suites
    #
    # This file contains a top-level script to run all of the tests
    # in an extension.  Execute it by invoking "tclsh testshell -testdir ... -load".
    #
    # Derived from tcl 8.2/all.tcl, Copyright (c) 1998-1999 by Scriptics Corporation.
    # Copyright (c) 1999 by Andreas Kupries <[email protected]>
    #
    # All rights reserved.
    # 
    # CVS $Id$
    
    if {[lsearch [namespace children] ::tcltest] == -1} {
        # Initialize autoloader, then load the commands and initialize
        # the package (constraints and command line argument processing).
    
        package require tcltest
        namespace import ::tcltest::*
    }
    
    # Directory containing the tests specified via '-testDir'.
    # Scripts to load the commands to test in '-load' / '-loadfile'.
    
    set ::tcltest::testSingleFile false
    
    puts stdout "Tests running in interp:       [info nameofexecutable]"
    puts stdout "Tests running in working dir:  $::tcltest::testsDirectory"
    
    if {[llength $::tcltest::skip] > 0} {
        puts stdout "Skipping tests that match:  $::tcltest::skip"
    }
    if {[llength $::tcltest::match] > 0} {
        puts stdout "Only running tests that match:  $::tcltest::match"
    }
    
    if {[llength $::tcltest::skipFiles] > 0} {
        puts stdout "Skipping test files that match:  $::tcltest::skipFiles"
    }
    if {[llength $::tcltest::matchFiles] > 0} {
        puts stdout "Only sourcing test files that match:  $::tcltest::matchFiles"
    }
    
    ::tcltest::loadTestedCommands
    
    set timeCmd {clock format [clock seconds]}
    puts stdout "Tests began at [eval $timeCmd]"
    
    # Source each of the specified tests
    
    foreach file [lsort [::tcltest::getMatchingFiles]] {
        set tail [file tail $file]
        puts stdout $tail
    
        if {[catch {source $file} msg]} {
    puts stdout $msg
        }
    }
    
    # cleanup
    puts stdout "\nTests ended at [eval $timeCmd]"
    ::tcltest::cleanupTests 1
    return
    
    PatchFiles:
    none, new file.
    
    
    
    This seems to be something for the test suite, or perhaps the
    sample extension.  It is not clear where it belongs or what one
    is supposed to do with it. 
    -- 09/20/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "34. tcltest Package"
  10. title changed to:
    add sample Makefile target and all.tcl file for tcl tests to
    
  11. type changed to: "RFE"