Check-in [9a1f50ef97]

Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed test utilities - Process --notfile, --file in Kettle instead of passing into the test file. Our testmain does not use the relevant command from Tcltest where this information would be used.
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA3-256: 9a1f50ef972b40caf96a3afa26b9619c0c06a8f6b8778d143fd6ed9324b27056
User & Date: aku 2018-09-12 23:27:15
Context
2018-09-12
23:27
Fixed test utilities - Process --notfile, --file in Kettle instead of passing into the test file. Our testmain does not use the relevant command from Tcltest where this information would be used. Leaf check-in: 9a1f50ef97 user: aku tags: trunk
2018-09-08
04:28
Extended test utilities - kt semi-local* : Search local first, then global - kt in : Change test directory context. check-in: 2416dce66e user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to testsuite.tcl.

21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
140
141
142
143
144
145
146






























147
148
149
150
151
152
153
154
155
156

157
158
159
160
161
162
163
164
165
166
167
168


169
170
171
172
173
174
175
    Tcl list of glob patterns.
    Run only the tests matching at least one of the patterns.
    Default is the * (match all), disabling the filter.
} * listsimple

kettle option define --notfile {
    Tcl list of glob patterns for test files to be skipped.
} {} listsimple

kettle option define --single {
    Run each test case completely independent.
} 0 boolean

kettle option define --valgrind {
    Run the tests under valgrind
................................................................................
	if {$cleanup} {
	    file delete -force $tmp
	}
    }

    return
}































proc ::kettle::Test::Run {srcdir testfiles localprefix} {
    # We are running each test file in a separate sub process, to
    # catch crashes, etc. ... We assume that the test file is self
    # contained in terms of loading all its dependencies, like
    # tcltest itself, utility commands it may need, etc. This
    # assumption allows us to run it directly, using our own
    # tcl executable as interpreter.

    # Translate kettle test options into tcltest options.

    set options {}
    foreach {o v} {
	constraints      constraints
	limitconstraints limitconstraints
	tmatch		 match		 
	tskip		 skip
	file		 file
	notfile		 notfile
    } {
	lappend options -$v [option get --$o]
    }



    stream to log ============================================================

    set main [path norm [option get @kettledir]/testmain.tcl]
    InitState

    # Generate map of padded test file names to ensure vertical
    # alignment of output across them.






|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>










>






<
<




>
>







21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
...
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193


194
195
196
197
198
199
200
201
202
203
204
205
206
    Tcl list of glob patterns.
    Run only the tests matching at least one of the patterns.
    Default is the * (match all), disabling the filter.
} * listsimple

kettle option define --notfile {
    Tcl list of glob patterns for test files to be skipped.
} {l.*.test} listsimple

kettle option define --single {
    Run each test case completely independent.
} 0 boolean

kettle option define --valgrind {
    Run the tests under valgrind
................................................................................
	if {$cleanup} {
	    file delete -force $tmp
	}
    }

    return
}

proc ::kettle::Test::Skip {skiplist testfiles} {
    lmap t $testfiles {
	if {[Skip1 $skiplist $t]} continue
	set t
    }
}

proc ::kettle::Test::Skip1 {skiplist path} {
    set path [file tail $path]
    foreach pattern $skiplist {
	if {[string match $pattern $path]} { return 1 }
    }
    return 0
}

proc ::kettle::Test::Match {matchlist testfiles} {
    lmap t $testfiles {
	if {![Match1 $matchlist $t]} continue
	set t
    }
}

proc ::kettle::Test::Match1 {matchlist path} {
    set path [file tail $path]
    foreach pattern $matchlist {
	if {[string match $pattern $path]} { return 1 }
    }
    return 0
}

proc ::kettle::Test::Run {srcdir testfiles localprefix} {
    # We are running each test file in a separate sub process, to
    # catch crashes, etc. ... We assume that the test file is self
    # contained in terms of loading all its dependencies, like
    # tcltest itself, utility commands it may need, etc. This
    # assumption allows us to run it directly, using our own
    # tcl executable as interpreter.

    # Translate kettle test options into tcltest options.
    # The file matching options are handled by ourselves.
    set options {}
    foreach {o v} {
	constraints      constraints
	limitconstraints limitconstraints
	tmatch		 match		 
	tskip		 skip


    } {
	lappend options -$v [option get --$o]
    }

    set testfiles [Skip [option get --notfile] [Match [option get --file] $testfiles]]
    
    stream to log ============================================================

    set main [path norm [option get @kettledir]/testmain.tcl]
    InitState

    # Generate map of padded test file names to ensure vertical
    # alignment of output across them.