Ignore:
Timestamp:
Dec 10, 2014 10:37:54 AM (9 years ago)
Author:
mmc
Message:

Added support for "rappture -execute" option, so that we can execute
the run for a given driver file without involving the GUI. This is
useful for the instant-on caching function, and also for a web services
interface that could be used to launch runs without the GUI.

File:
1 edited

Legend:

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

    r4127 r4834  
    1212#    rappture -builder ?-tool <toolfile>?
    1313#    rappture -tester ?-tool <toolfile>? ?-testdir <directory>?
     14#    rappture -execute driver.xml ?-tool <toolfile>?
    1415#
    1516#  The default option is "-run", which brings up the GUI used to
     
    5354                set reqpkgs Tk
    5455            }
     56            -execute {
     57                # for web services and simulation cache -- don't load Tk
     58                set reqpkgs ""
     59                if {[llength $argv] < 1} {
     60                    puts stderr "error: missing driver.xml file for -execute option"
     61                    exit 1
     62                }
     63                set driverxml [lindex $argv 0]
     64                set argv [lrange $argv 1 end]
     65
     66                if {![file readable $driverxml]} {
     67                    puts stderr "error: driver file \"$driverxml\" not found"
     68                    exit 1
     69                }
     70
     71                set dir [file dirname [info script]]
     72                set mainscript [file join $dir execute.tcl]
     73            }
    5574            -tool {
    5675                set toolxml [lindex $argv 0]
     
    89108                puts stderr "  rappture -builder ?-tool toolFile?"
    90109                puts stderr "  rappture -tester ?-auto? ?-tool toolFile? ?-testdir directory?"
     110                puts stderr "  rappture -execute driver.xml ?-tool toolFile?"
    91111                exit 1
    92112            }
Note: See TracChangeset for help on using the changeset viewer.