metaonly module xdc.bld.Script |
|
|
|
Model of a script
var Script = xdc.useModule('xdc.bld.Script');
module-wide constants & types
per-instance config parameters
params.
name// =
String undefined;
per-instance functions
struct Script.Attrs |
|
Optional attributes for a script instance
XDCscript usage |
meta-domain |
var obj = new Script.Attrs;
obj.hasMain = Bool ...
// if true, this script defines main()
obj.exportSrc = Bool ...
// if false, don't add to default release
// releases this script is a part of
FIELDS
releases
This array contains releases that will contain the
script. Thus, a single script can be part of any set of
releases. Each script is always added to the package's
"default release" in addition to any releases specified in
the releases array.
hasMain
This script defines a main() function. This
function is called after the capsule is loaded. If the
script does not define main(), it must contain statements
that will run script as part of loading the script.
exportSrc
Scripts are added to the default release
unless this flag is set to false.
SEE
Instance Config Parameters |
|
XDCscript usage |
meta-domain |
var params = new Script.Params;
// Instance config-params object
// Optional attributes for this test instance
params.name = String undefined;
//
config Script.attrs // instance |
|
Optional attributes for this test instance
XDCscript usage |
meta-domain |
var params = new Script.Params;
...
config Script.name // instance |
|
XDCscript usage |
meta-domain |
var params = new Script.Params;
...
params.name = String undefined;
Script.addTest() // instance |
|
Add specified test to script
XDCscript usage |
meta-domain |
ARGUMENTS
DETAILS
A test encapsulates a script and a set of arguments passed to
the script when it is run.
Tests are run by naming the goal "<test_name>.test" on the xdc
command line; <test_name> is the test's name.
Multiple tests may have the same name; in this case, it is possible
to run all tests using the single goal "<test_name>.test"
RETURNS
Returns the
xdc.bld.Test instance object
created.
THROWS
Error exceptions are thrown for fatal errors.
SEE
generated on Thu, 27 Sep 2012 23:21:22 GMT