This appendix lists the parameters for running the OpenScript Command-Line Tools Interface (CTLI). The Command-Line Tools Interface is an umbrella interface for running OpenScript command-line tools. The command-line tools include the OpenScript Command-Line Compiler, the OpenScript Command-Line Asset Updater, the OpenScript Command-Line Remapper and the Command-Line Resolve Dependency.
To run the Command-Line Tools Interface, type:
[OpenScript Install Dir]/osclti.bat
[options
]
[
options
]
may consist of options for the OpenScript Command-Line Compiler, the OpenScript Command-Line Asset Updater, OpenScript Command-Line Remapper, or help information.
The OpenScript Command-Line Tools Interface has the following prerequisites:
The OpenScript application must be open on the machine you are using to run the Command-Line Tools Interface.
All repositories referenced by scripts being compiled (including function libraries) must be referenced in OpenScript using Manage Repositories on the Tools menu.
This section describes how to use the command line tools settings.
Prints out General help:
osclti.bat help
Runs OpenScript Command-Line Compiler with supplied options. If options are incorrect, it prints the Compiler help and exits:
osclti.bat compile <options>
Prints out OpenScript Command-Line Compiler help:
osclti.bat compile -help
Runs OpenScript Command-Line Asset Updater with supplied options. If options are incorrect, it prints Update Assets help and exits:
osclti.bat updateAssets <options>
Prints out OpenScript Command-Line Asset Updater help:
osclti.bat updateAssets -help
Runs OpenScript Command-Line Remapper with supplied options. If options are incorrect, it prints Remapper help and exits:
osclti.bat remap <options>
Prints out OpenScript Command-Line Remapper help:
osclti.bat remap -help
Runs OpenScript Command-Line Resolve Dependency with supplied options. If options are incorrect, it prints resolveDependency help and exits:
osclti.bat resolveDependency <options>
Prints out OpenScript Command-Line Resolve Dependency help:
osclti.bat resolveDependency -help
Prints out General help:
osclti.bat
Prints out General help:
osclti.bat <any unknown argument>
This section lists the command line settings that can be used with the Command-Line Tools Interface.
The following table lists the OpenScript Command-Line Compiler options.
Setting | Description |
---|---|
-rootFolder [ path_to_folder ] |
Specifies a root folder in a tree of folders containing multiple scripts for batch compilation. When -rootFolder is specified, the tool builds all scripts in the subtree of folders underneath it, recursively. One and only one option from -rootFolder or -script options must be specified. Use -rootFolder option for batch build, use -script option for the single script build.
Example usage:
|
-script [ path_to_script_folder ] |
Specifies the path to a single script's folder for single script compilation. One and only one option from -rootFolder or -script options must be specified. Use -rootFolder option for batch build, use -script option for the single script build.
Example usage:
|
-scriptList [ path_to_file_containing_list_of_scripts ] |
Specifies the path to the file containing an ordered list of scripts for batch compilation. Each line in a script list can be one of the following:
Scripts will be compiled in the order they appear in script list. Example usage:
|
-logFile [ path_to_log ] |
Optional. Specifies where the compile log output file should go. User must specify writable location. User must specify a writable location. If -logFile is not specified, then build.log will be created in the user's folder (i.e. C:\Documents and Settings\<username>) or in the OpenScript directory if the user's folder is not writable.
Example usage:
|
-verbose |
Optional. Specifies whether the compiler should use verbose output logging. If -verbose option is specified, then the compiler prints accessed/processed units into the output log file.
Example usage:
|
-stopBatch |
Optional. Specifies if the batch compiler should stop on any script failure, or continue compiling other scripts even if a failure happens. The default behavior is not to stop the batch compilation on failure.
Example usage:
|
@ optionsFile |
Optional. Specifies a file containing one or more command-line options. User should substitute optionsFile for path to existing file.
Example usage: osclti compile @C:\OracleATS\OFT\options.txt One and only one option from When Options can be specified on command-line or/and in the options file specified by the All dedicated function library scripts in a root folder or otherwise used by compiled scripts SHOULD BE PRE-COMPILED SEPARATELY when |
The following table lists the OpenScript Command-Line Asset Updater options.
Setting | Description |
---|---|
-add |
Specify to add a new asset. One and only one option from -add or -update options must be specified.
Example usage:
|
-change |
Specify to change an existing asset. One and only one option from -add or -change options must be specified.
Example usage:
|
-rootFolder [ path_to_folder ] |
Specify a folder containing multiple scripts to update. When -rootFolder is specified, the tool builds all scripts in the subtree of folders underneath it, recursively.
Example usage:
|
-type [ AssetType ] |
Specify the type of asset being added or updated. AssetType should be one of the following:
The asset updater automatically detects if this asset is a dedicated function library and, if it is, then it makes appropriate changes in scripts to change. Example usage:
|
-asset [ AssetList ] |
Specify the list of one or more asset descriptions to add or change. If changing an asset, then AssetList should contain a single asset description. Separate multiple asset descriptions with a semicolon. For example: assetDisc;assetDisc;... ;assetDisc.
Each asset description should take the form: alias=chosenAlias:repoName/path to assetFolder relative to Reposiotry/assetFileName This is the only possible form of specifying assets to add. In this case, each script will be assigned the asset of this type in the specified repository location. Assets will be known to each script by the specified alias. If an asset of the same type with the same alias exists for a script, then the location of the asset will be changed according to command-line arguments. When changing assets, each script with an asset of the same type with the same alias will change its location according to the command-line arguments. When changing assets, the asset description can be specified in another form: oldRepoName/old/path/toAssetFolder/OldAsset FileName=repoName/path to assetFolder relative to Reposiotry/assetFileName In this case, if any script has an asset in the old location, then without changing the asset alias, the asset location will be changed according to the command-line arguments. Example usage:
|
-logFile [ path_to_log ] |
Optional. Specify where the compile log output file should go. The logFile should be located in a directory where the user has rights to read, write, change, create and delete this file. If -logFile is not specified, then build.log will be created in the OpenScript directory.
Example usage:
|
The remap
tool is used for remapping script asset references against regular OpenScript scripts only. The remap tool does not change anything for dedicated function library scripts. Any changes to dedicated function library scripts must be done on an individual basis through the OpenScript UI. Changes to function library scripts should precede changes to regular scripts with the remap
tool.
The remap
actions as one of: -scriptRelative
, -repository
or -reponame
are mutually exclusive. You can specify only one of them on the command line at a time.
The following table lists the OpenScript Command-Line Remapper options.
Setting | Description |
---|---|
-rootFolder [ path_to_folder ] |
Specify a folder containing multiple scripts for batch remapping. When -rootFolder is specified, the tool remaps all scripts in the subtree of folders underneath it, recursively.
Example usage:
|
-logFile [ path_to_log ] |
Optional. Specify where the remapping log output file should go. User must specify a writable location. If -logFile is not specified, then build.log will be created in the user's folder (i.e. C:\Documents and Settings\<username>) or in the OpenScript directory if the user's folder is not writable.
Example usage:
|
-scriptRelative |
Changes all asset references in all scripts under -rootFolder and its subfolders to have script-relative references.
This action does not require any arguments. If the repository for an asset does not exist or a script declaring an asset does not belong to this repository, then any references will not be changed and a warning message will appear. Example usage:
This example changes relative-to-Repository asset references to a script-relative references for all scripts under the folder. However, it does not change dedicated function libraries. |
-repository repoName = newRepoLoc |
Changes statically-defined repository mapping for the specified repository to a new location for the current user without starting OpenScript.
The If This action is equivalent to the Edit action of the Repository Manager dialog in OpenScript. Example usage:
This example changes the mapping of the FusionOATS repository for the current user.
This example adds a new repository named DynamicRepo mapped to V: drive for the current user. |
-reponame oldRepoName = newRepoName |
Changes all asset references relative to the named repository in all scripts under -rootFolder and its subfolders to a relative reference to a newly named repository.
The The Example usage:
This example changes "relative-to-repository FusionOats" asset references to a "relative-to-repository ADE" asset references for all scripts under the specified folder and its subfolders. However, it does not change dedicated function library scripts. For each changed reference, other parts of the reference, namely, path-relative-to-repository and a file remain intact. Only the repository name changes. |
Creates an ordered by dependency list of scripts to compile. The following table lists the OpenScript Command-Line resolveDependency options.
Setting | Description |
---|---|
-scripts [ scriptList ] |
Specifies the scripts to include. < scriptList > can be specified in 2 forms:
A single script can be specified on the command line without any delimiters. Example usage:
|
-logFile [ path_to_dependency_log ] |
Optional. Specifies where the trace of dependency resolution should go. You must specify a writable location.
Example usage:
|
-outputList [ path_to_file_containing_ordered_by_dependencies_list_of_scripts ] |
Output list contains all scripts and function libraries needed for compilation of scripts in the input [ scriptList ] . Each line in output list is a path to a script folder to compile. The order of lines goes from script without any dependency to scripts with more dependencies on previous scripts in this file.
Example usage:
|
-verifyIDunique |
Optional. If specified, then Dependency Resolver checks that any script has a unique script id. Uniqueness is required for successful execution of test suites, because it avoids class Loader confusion in run time.
Example usage:
|