Changeset 4127 for trunk/gui/apps


Ignore:
Timestamp:
Jan 16, 2014, 10:51:33 AM (11 years ago)
Author:
mmc
Message:

Added a "-auto" option to "rappture -tester" so you can run all tests
without the GUI in the background. This is needed as we try to run
regressions automatically during the contribtool process. In order to
do this, I had to split the Tool object into a "Task" that can run
without the GUI, and the "Tool" that acts as a ControlOwner?. I also
had to support for resource file processing into the generic Rappture
package. As a result, "rappture -tester -auto" can run without an
X window connection.

Added support for "job_protocol mx" in the resources file. If you
specify this, then Rappture will execute "mx cmd arg arg..." to run
each job.

Location:
trunk/gui/apps
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/apps/launcher.tcl

    r3177 r4127  
    2424#  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    2525# ======================================================================
    26 package require RapptureGUI
    27 set guidir $RapptureGUI::library
    28 
    29 package require RapptureBuilder
    30 set blddir $RapptureBuilder::library
    31 
    32 package require RapptureTester
    33 set testdir $RapptureTester::library
    34 
    35 set mainscript [file join $guidir scripts main.tcl]
     26set mainscript ""
    3627set alist ""
    3728set toolxml ""
     
    4536        switch -- $opt {
    4637            -run {
     38                package require RapptureGUI
     39                set guidir $RapptureGUI::library
    4740                set mainscript [file join $guidir scripts main.tcl]
     41                set reqpkgs Tk
    4842            }
    4943            -builder {
     44                package require RapptureBuilder
     45                set blddir $RapptureBuilder::library
    5046                set mainscript [file join $blddir scripts main.tcl]
     47                set reqpkgs Tk
    5148            }
    5249            -tester {
     50                package require RapptureTester
     51                set testdir $RapptureTester::library
    5352                set mainscript [file join $testdir scripts main.tcl]
     53                set reqpkgs Tk
    5454            }
    5555            -tool {
     
    6565                lappend alist $opt [lindex $argv 0]
    6666                set argv [lrange $argv 1 end]
     67            }
     68            -auto {
     69                # for the tester in automatic mode -- don't load Tk
     70                package require RapptureTester
     71                set testdir $RapptureTester::library
     72                set mainscript [file join $testdir scripts auto.tcl]
     73                set reqpkgs ""
    6774            }
    6875            -load {
     
    8188                puts stderr "  rappture ?-run? ?-tool toolFile? ?-nosim 0/1? ?-load file file ...?"
    8289                puts stderr "  rappture -builder ?-tool toolFile?"
    83                 puts stderr "  rappture -tester ?-tool toolFile? ?-testdir directory?"
     90                puts stderr "  rappture -tester ?-auto? ?-tool toolFile? ?-testdir directory?"
    8491                exit 1
    8592            }
    8693        }
    8794    }
     95}
     96
     97# If no arguments, assume that it's the -run option
     98if {$mainscript eq ""} {
     99    package require RapptureGUI
     100    set guidir $RapptureGUI::library
     101    set mainscript [file join $guidir scripts main.tcl]
     102    set reqpkgs Tk
    88103}
    89104
     
    97112#       blt::bgexec.  It doesn't try to redirect stderr into a file.
    98113set argv $alist
    99 package require Tk
     114foreach name $reqpkgs {
     115    package require $name
     116}
    100117source  $mainscript
  • trunk/gui/apps/rappture.in

    r3177 r4127  
    1616dir=`dirname $0`
    1717. $dir/rappture.env
    18 exec tclsh $dir/launcher.tcl -- "$@"
     18exec tclsh $dir/launcher.tcl "$@"
Note: See TracChangeset for help on using the changeset viewer.