|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsir.mts.Configuration
public final class Configuration
Records the settings that control various aspects of the operation of MakeTestScript.
| Field Summary | |
|---|---|
static java.lang.String |
ARISTOTLE_DB_DIR
Constant specifying the default path to the trace file source for Aristotle. |
static java.lang.String |
INPUT_DIR
Constant specifying the path the to subject inputs directory. |
static java.lang.String |
OUTPUT_DIR
Constant specifying the path the to subject outputs directory. |
static java.lang.String |
SOFYA_DB_DIR
Constant specifying the default path to the trace file source for Sofya. |
static java.lang.String |
TESTSCRIPT_DIR
Constant specifying the path the to subject testscripts directory, used to locate scripts referenced by STImpL script commands. |
static java.lang.String |
TRACE_DIR
Constant specifying the path the to subject traces directory. |
| Constructor Summary | |
|---|---|
Configuration()
Creates a new configuration with default values where appropriate. |
|
| Method Summary | |
|---|---|
boolean |
disableEscapes()
Reports whether the new escape character capabilities of the MakeTestScript lexer are disabled. |
void |
disableEscapes(boolean on)
Specifies whether the new escape character capabilities of the MakeTestScript lexer should be disabled. |
boolean |
enableLegacyMacros()
Reports whether legacy substitution macros are enabled. |
void |
enableLegacyMacros(boolean on)
Specifies whether legacy substitution macros should be enabled. |
java.lang.String |
getComparisonCommand()
Gets the command to be used for comparing outputs in comparison scripts. |
java.lang.String |
getComparisonDirectory()
Gets the path to the directory containing the files against which outputs should be compared by a comparison script. |
java.lang.String |
getExecutablePrefix()
Gets the prefix that will be prepended to the executable name. |
java.lang.String |
getExecutableSuffix()
Gets the suffix that will be appended to the executable name. |
java.lang.String |
getExperimentDirectory()
Gets the path to the experiment root directory of the subject. |
java.lang.String |
getInvokePrefix()
Gets the prefix that will be inserted before the entire test case invocation command. |
java.lang.String |
getInvokeSuffix()
Gets the suffix that will be appended to the end of the entire test case invocation command. |
java.lang.String |
getMTSCommandString()
Gets the command line string used to invoke MakeTestScript. |
java.lang.String |
getScriptName()
Gets the name of the script to be generated. |
java.lang.String |
getStimpleFile()
Gets the name of the STImpL file to be processed. |
java.lang.String |
getSubjectExecutable()
Gets the name of the executable program to be invoked. |
java.lang.String |
getTargetType()
Gets the target type of script to be generated (such as C shell, Bourne shell, etc). |
java.lang.String |
getTraceName()
Gets the name of the trace file generated by the tracing tool. |
java.lang.String |
getTraceSourceDirectory()
Gets the path to the directory where the trace files produced by the tracing tool in use can be found. |
boolean |
isComparing()
Reports whether the script to be generated is an output comparing script. |
boolean |
isExecutableSuffixConstrained()
Checks the flag specifying whether the executable suffix will be appended only on test cases specifying a test driver (with the STImpL '-D' command). |
boolean |
isJava()
Reports whether the subject program to be tested by the generated script has been indicated to be a Java program. |
boolean |
isTracing()
Reports whether the script to be generated is a trace collecting script. |
void |
setComparing(boolean on)
Sets whether the script to be generated is an output comparing script. |
void |
setComparisonCommand(java.lang.String diffCmd)
Sets the command to be used for comparing outputs in comparison scripts. |
void |
setComparisonDirectory(java.lang.String compareDir)
Sets the path to the directory containing the files against which outputs should be compared by a comparison script. |
void |
setExecutablePrefix(java.lang.String exePrefix)
Sets a prefix to be prepended to the executable name. |
void |
setExecutableSuffix(java.lang.String exeSuffix)
Sets a suffix to be appended to the executable name. |
void |
setExecutableSuffixConstrained(boolean on)
Sets a flag indicating that the executable suffix should be appended only on test cases specifying a test driver (with the STImpL '-D' command). |
void |
setExperimentDirectory(java.lang.String expDir)
Sets the path to the experiment root directory of the subject. |
void |
setInvokePrefix(java.lang.String invPrefix)
Sets a prefix to be inserted before the entire test case invocation command. |
void |
setInvokeSuffix(java.lang.String invSuffix)
Sets a suffix that will be appended to the end of the entire test case invocation command. |
void |
setJava(boolean on)
Sets a flag indicating whether the subject program to be tested by the generated script is a Java program. |
void |
setMTSCommandString(java.lang.String cls,
java.lang.String[] argv)
Records the command line string used to invoke MakeTestScript. |
void |
setScriptName(java.lang.String name)
Sets the name of the script to be generated. |
void |
setStimpleFile(java.lang.String name)
Sets the name of the STImpL file to be processed. |
void |
setSubjectExecutable(java.lang.String exeName)
Sets the name of the executable program to be invoked. |
void |
setTargetType(java.lang.String targetType)
Sets the target type of script to be generated (such as C shell, Bourne shell, etc). |
void |
setTraceName(java.lang.String traceName)
Sets the name of the trace file generated by the tracing tool, which must be invariant. |
void |
setTraceSourceDirectory(java.lang.String traceDir)
Sets the path to the directory where the trace files produced by the tracing tool in use can be found. |
void |
setTracing(boolean on)
Sets whether the script to be generated is a trace collecting script. |
java.lang.String |
toString()
Produces a string representation of the current configuration. |
void |
validate()
Checks that the configuration is consistent and complete. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String INPUT_DIR
public static final java.lang.String OUTPUT_DIR
public static final java.lang.String TRACE_DIR
public static final java.lang.String TESTSCRIPT_DIR
public static final java.lang.String SOFYA_DB_DIR
public static final java.lang.String ARISTOTLE_DB_DIR
| Constructor Detail |
|---|
public Configuration()
| Method Detail |
|---|
public void setMTSCommandString(java.lang.String cls,
java.lang.String[] argv)
cls - Name of the class file used to invoke MakeTestScript.argv - Arguments passed to the class.public java.lang.String getMTSCommandString()
public void setStimpleFile(java.lang.String name)
name - Name of the STImpL file from which to generate a script.public java.lang.String getStimpleFile()
public void setScriptName(java.lang.String name)
name - Name of the script to be generated.public java.lang.String getScriptName()
public void setExperimentDirectory(java.lang.String expDir)
expDir - Path to the experiment root directory of the subject.public java.lang.String getExperimentDirectory()
public void setSubjectExecutable(java.lang.String exeName)
exeName - Name of the executable to be invoked.public java.lang.String getSubjectExecutable()
public void setExecutablePrefix(java.lang.String exePrefix)
exePrefix - String that will be prepended to the executable name.public java.lang.String getExecutablePrefix()
public void setExecutableSuffix(java.lang.String exeSuffix)
exeSuffix - String that will be appended to the executable name.public java.lang.String getExecutableSuffix()
public void setExecutableSuffixConstrained(boolean on)
on - true to enable, false otherwise.public boolean isExecutableSuffixConstrained()
true if the suffix appended only on
test cases specifying a test driver, false otherwise.public void setInvokePrefix(java.lang.String invPrefix)
The prefix is inserted with separating whitespace.
invPrefix - String to be inserted before the entire
test case invocation command.public java.lang.String getInvokePrefix()
public void setInvokeSuffix(java.lang.String invSuffix)
The suffix is appended with a separating whitespace.
invSuffix - String to be appended to the end of the entire test
case invocation command.public java.lang.String getInvokeSuffix()
public void setComparing(boolean on)
on - true to generate a script that compares
outputs, false otherwise.public boolean isComparing()
true if the generated script will compare outputs,
false otherwise.public void setComparisonCommand(java.lang.String diffCmd)
If this method is not called, a default value is used.
diffCmd - Command, and any associated options, that should be used
for comparing output files by a comparison script.public java.lang.String getComparisonCommand()
public void setComparisonDirectory(java.lang.String compareDir)
This method must be called before attempting to generate a comparison script.
compareDir - Path to the directory containing previous outputs
against which the current outputs should be compared by the
generated comparison script.public java.lang.String getComparisonDirectory()
public void setTracing(boolean on)
on - true to generate a script that collects traces,
false otherwise.public boolean isTracing()
true if the generated script will collect traces,
false otherwise.public void setTraceSourceDirectory(java.lang.String traceDir)
traceDir - Path to the directory where trace files produced by
the tracing tool in use can be found.public java.lang.String getTraceSourceDirectory()
public void setTraceName(java.lang.String traceName)
traceName - Name of the trace file generated by the tracing tool
in use.public java.lang.String getTraceName()
public void setJava(boolean on)
This configuration option is a shorthand to automatically set
various options to values that yield compatibility with the output
of the old javamts tool. It is purely a convenience.
on - boolean true to indicate that the subject
to be tested by the generated script is a Java program.public boolean isJava()
true if the program to be tested by the
generated script has been indicated to be a Java program.public void setTargetType(java.lang.String targetType)
targetType - String that is either a shorthand identifier for a
target script type that is understood by MakeTestScript,
or the name of a class implementing the TestScriptGenerator
interface (which must be found on the classpath).public java.lang.String getTargetType()
MakeTestScript, or the
name of a class implementing the TestScriptGenerator
interface (which must be found on the classpath).public void disableEscapes(boolean on)
MakeTestScript lexer should be disabled.
This option supports backwards compatibility with existing universe (STImpL) files. Universe files should be updated whenever possible, after which this option is unneeded.
on - true to disable slash-escapes in the
lexer, false otherwise.public boolean disableEscapes()
MakeTestScript lexer are disabled.
true if the slash-style escape sequences are
disabled in the MakeTestScript lexer.public void enableLegacyMacros(boolean on)
This currently enables only one macro, the '%n%' macro used to substitute the current test number in file move (&apos-F&apos) STImpL commands. The preferred replacement is to use the new STImpL macro command "\{TEST}" for current test number substitution, which works anywhere.
on - true to enable legacy substitution macros,
false otherwise.public boolean enableLegacyMacros()
true if legacy substitution macros are enabled,
false otherwise.
public void validate()
throws ConfigurationException
This method may attempt to guess certain configuration values if they are absent. Messages will be printed to the console if this occurs.
ConfigurationException - If a required configuration value
is absent and cannot be reasonably guessed.public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||