Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
19b49c31
"vscode:/vscode.git/clone" did not exist on "56538477143b144f2267ce98805a7b6edc763528"
Commit
19b49c31
authored
Jun 02, 2010
by
Pieter Noordhuis
Browse files
pass tags to filter and match via arguments
parent
3c5b5e15
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
19b49c31
...
...
@@ -88,7 +88,7 @@ staticsymbols:
tclsh utils/build-static-symbols.tcl
>
staticsymbols.h
test
:
tclsh8.5 tests/test_helper.tcl
tclsh8.5 tests/test_helper.tcl
--tags
"
${TAGS}
"
bench
:
./redis-benchmark
...
...
tests/support/test.tcl
View file @
19b49c31
...
...
@@ -15,7 +15,7 @@ proc test {name code okpattern} {
if
{[
llength $::allowtags
]
> 0
}
{
set matched 0
foreach tag $::allowtags
{
if
{[
lsearch $::tags $tag
]}
{
if
{[
lsearch $::tags $tag
]
>= 0
}
{
incr matched
}
}
...
...
tests/test_helper.tcl
View file @
19b49c31
...
...
@@ -91,6 +91,25 @@ proc main {} {
cleanup
}
# parse arguments
for
{
set j 0
}
{
$j
<
[
llength $argv
]}
{
incr j
}
{
set opt
[
lindex $argv $j
]
set arg
[
lindex $argv
[
expr $j+1
]]
if
{
$opt
eq
{
--tags
}}
{
foreach tag $arg
{
if
{[
string index $tag 0
]
eq
"-"
}
{
lappend ::denytags
[
string range $tag 1 end
]
}
else
{
lappend ::allowtags $tag
}
}
incr j
}
else
{
puts
"Wrong argument:
$opt
"
exit 1
}
}
if
{[
catch
{
main
}
err
]}
{
if
{[
string length $err
]
> 0
}
{
# only display error when not generated by the test suite
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment