Run Interactive Jobs with vxt

You may want to run some of your jobs in an interactive fashion where a user can press [Ctrl]-[C] and take the hand on the tool in a terminal in the middle of a run.

FlowTracer's FDL allows you to run some jobs from inside an X-window terminal by giving some option to the J or T keyword:
  • -xt: runs the job in an open xterm (steals mouse focus). Logging happens as usual despite the xterm.
  • -xi: runs the job in an iconified xterm: allows the benefit of running in an xterm without stealing focus from the user when the job starts.
  • -xb: runs in the background (no need for a DISPLAY even). This is similar to not using any option at all and is implemented for completeness of the user interface.

The developer has full control on the interactive terminal used to run the tool and can alter the properties: VXT_XTERM and VXT_LOG after the J -xt line with a vtk_prop_set.

Changing the VXT_XTERM property would allow for different arguments to be passed to xterm, or a different terminal like konsole or rxvt to be used as examples.



Figure 1.
During vovbuild, the developer can modify a job after its definition by changing the property with something similar to:
vtk_prop_set $node_id VXT_LOG {retval=`exec 3>&1; xterm -sl 20000 -sb -e sh -c "set -o pipefail;}
Once the developer is happy with the changes, it can be made the default for all further jobs in the build by setting "make(VXT_XTERM)" as in:
set make(VXT_XTERM) {retval=`exec 3>&1; xterm -sl 20000 -sb -e sh -c "set -o pipefail;}
Changing the VXT_LOG property would allow for example for capturing the log in a different name file:


Figure 2.
During vovbuild, the developer can modify a job after its definition by changing the property with something similar to:
vtk_prop_set $node_id VXT_LOG {| tee -i .stdlog\$VOV_JOBID.log 2>&1 3>&-; echo $? 1>&3 " `}
Once the developer is happy with the changes, it can be made the default for all further jobs in the build by setting "make(VXT_XTERM)" as in:
set make(VXT_LOG) {| tee -i .stdlog\$VOV_JOBID.log 2>&1 3>&-; echo $? 1>&3 " `}
Note: This feature supports only simple commands (single tool). If you need some complex commands, write them in a small shell script, and use the small shell script as the command line for vxt.