View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0023152 | Open CASCADE | OCCT:DRAW | public | 2012-05-12 19:34 | 2012-11-16 13:16 |
Reporter | Assigned To | ||||
Priority | normal | Severity | feature | ||
Status | closed | Resolution | fixed | ||
Product Version | 6.5.3 | ||||
Target Version | 6.5.4 | Fixed in Version | 6.5.4 | ||
Summary | 0023152: Possibility to have echo of DRAW commands in log file | ||||
Description | When some script is executed with "source" command in DRAW, only messages explicitly printed by 'puts' and similar commands, and final result of the script, are output. For testing and debug (as well as learning / demonstration) it could be useful to see also actual commands being executed, and their intermediate results. Currently this possibility is implemented in QADraw package as follows: - If environment variable QA_DRAW is defined to "1", QADraw commands get loaded automatically, and other defined commands are substituted by wrapper - If environment variable QA_print_command is defined to "1", this wrapper replicates the command being executed to standard error stream - If environment variable QA_DUP is set to "1", this wrapper tries to capture all output of the command (by redirecting standard streams to temporary files) and dump it to Tcl interpretor This approach has problems: 1. It is unnecessarily overcomplicated and tricky 2. Use of environment variables does not allow to change behavior dynamically (switch on/off during one DRAW session) 3. Capturing of cout seems to be not really useful, as most of commands can be handled well without this (to be checked) 4. Intermediate results of commands is lost anyway I propose to implement this differently, on the level of Draw package: a) Provide switch to enable / disable echo of the command to cerr (managed dynamically by dedicated DRAW command, e.g. 'decho') b) Provide specific command (e.g. 'dsource') to run script from the file with this option and echo of each intermediate command enabled automatically | ||||
Tags | No tags attached. | ||||
Test case number | chl 935 Y0 | ||||
|
The changes are pushed to Git branch CR23152; please review (see commit log for description of changes) |
|
I added ios::sync_with_stdio() call to Draw::BasicCommands. |
|
Dear BugMaster, The workbenches KAS:dev:mkv-23152-occt (GIT branch CR) KAS:dev:mkv-23152-products (GIT master) were compiled on Linux platform. There is compilation error in follwing file: Info : -------> Draw_Interpretor.cxx Error : Errors occured in Shell /dn47/KAS/dev/mkv-23152-occt/src/Draw/Draw_Interpretor.cxx:34:16: error: io.h: No such file or directory Error : Failed : Draw_Interpretor.cxx Info : ----------------------- Compilation Report ----------------------- Info : Failed : :LOC:dev:mkv-23152-occt:Draw:source:Draw_Interpretor.cxx Info : ----------------------------------------------------------------- |
|
Compilation error on Linux corrected; please test |
|
Dear BugMaster, The workbenches KAS:dev:mkv-23152-occt (GIT branch CR23152) KAS:dev:mkv-23152-products (GIT master) were compiled on Linux platform and tested. Regression: Not detected Improvements: Not detected Testing case: Test case for this bug is chl 935 Y0. It is OK in this branch. See results in /QADisk/occttests/results/KAS/dev/mkv-23152-products_27062012/lin See reference results in /QADisk/occttests/results/KAS/dev/products-20120622-opt_22062012/lin See test cases in /QADisk/occttests/tests/ED N.B. In order to launch testing case you can make use the following instructions http://doc/doku.php?id=occt:certification |
2012-06-28 17:13 tester |
Y0 (1,001 bytes) |
occt: master aa02980d 2012-06-28 13:46:43
Committer: abv Details Diff |
0023152: Possibility to have echo of DRAW commands in log file Two commands are added in DRAW: decho: allows switch on/off echo of commands and their results. When echo is on, all commands implemented as OCCT DRAW C procedures will be echoed to standard output, along with their result. This can be useful to trace process of execution of script evaluated by 'source' command. dlog: implements off-screen log for recording DRAW commands and their output for further processing in Tcl script (mainly for use in automatic tests). Run this command without arguments to get help. Added ios::sync_with_stdio() call to Draw::BasicCommands. Correction for compilation on Linux |
Affected Issues 0023152 |
|
mod - src/Draw/Draw_BasicCommands.cxx | Diff File | ||
mod - src/Draw/Draw_Interpretor.cdl | Diff File | ||
mod - src/Draw/Draw_Interpretor.cxx | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2012-05-12 19:34 |
|
New Issue | |
2012-05-12 19:34 |
|
Assigned To | => mkv |
2012-05-16 12:37 |
|
Assigned To | mkv => abv |
2012-05-16 12:37 |
|
Status | new => assigned |
2012-05-16 16:41 |
|
Note Added: 0020545 | |
2012-05-16 16:41 |
|
Assigned To | abv => vtn |
2012-05-16 16:41 |
|
Status | assigned => resolved |
2012-06-26 17:52 |
|
Note Added: 0020798 | |
2012-06-26 17:52 |
|
Assigned To | vtn => mkv |
2012-06-26 17:52 |
|
Status | resolved => reviewed |
2012-06-27 10:59 |
|
Note Added: 0020802 | |
2012-06-27 11:01 |
|
Assigned To | mkv => abv |
2012-06-27 11:01 |
|
Status | reviewed => assigned |
2012-06-27 11:57 |
|
Note Added: 0020803 | |
2012-06-27 11:57 |
|
Status | assigned => resolved |
2012-06-27 12:05 |
|
Status | resolved => reviewed |
2012-06-27 12:17 |
|
Assigned To | abv => mkv |
2012-06-28 17:13 |
|
Note Added: 0020815 | |
2012-06-28 17:13 |
|
File Added: Y0 | |
2012-06-28 17:14 |
|
Test case number | => chl 935 Y0 |
2012-06-28 17:14 |
|
Assigned To | mkv => bugmaster |
2012-06-28 17:14 |
|
Status | reviewed => tested |
2012-07-02 11:43 |
|
Changeset attached | => occt master aa02980d |
2012-07-02 11:44 |
|
Assigned To | bugmaster => abv |
2012-07-02 11:44 |
|
Status | tested => verified |
2012-07-02 11:44 |
|
Resolution | open => fixed |
2012-11-16 13:15 | bugmaster | Fixed in Version | => 6.5.4 |
2012-11-16 13:16 | bugmaster | Status | verified => closed |