Re: want to redefine tcltest to add database updates
- From: Bryan Oakley <oakley@xxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 29 Mar 2007 13:49:48 GMT
dwechsler wrote:
After recently learning that I can redefine any command, I was
thinking about redefining the test command from tcltest so it can
parse the initial description string and add it to a database. I'd
like it to also somehow look at the results of the tests to get pass/
fail status that I can also add.
If that's all that you want, you might consider simply adding an execution trace on the test command. The way it works is this: every time the test command runs, a proc of your choosing will get called. You can choose for it to run either immediately before or immediately after the test command runs. You'll be given the whole command line and other useful bits depending on when your command is run.
http://www.tcl.tk/man/tcl8.4/TclCmd/trace.htm#M9
Arguably, that is a little less fraught with peril than redefining test, though redefining test is a perfectly fine idea if you want more control.
--
Bryan Oakley
http://www.tclscripting.com
.
- Follow-Ups:
- Re: want to redefine tcltest to add database updates
- From: dwechsler
- Re: want to redefine tcltest to add database updates
- References:
- want to redefine tcltest to add database updates
- From: dwechsler
- want to redefine tcltest to add database updates
- Prev by Date: Re: GiD
- Next by Date: Re: Need help with high-level tcltest wrapper for rapid test creation
- Previous by thread: want to redefine tcltest to add database updates
- Next by thread: Re: want to redefine tcltest to add database updates
- Index(es):
Relevant Pages
|