public class JUnitTclTestRun
extends java.lang.Object
If the fileName JVM property is set, then the file named by that property is sourced. Otherwise, the testDefs.tcl file is sourced and the doallTests Tcl proc that is defined in $PTII/util/testsuite/testDefs.tcl is invoked and then any models in the auto/ directory are invoked.
To run one test file (NamedObj.tcl):
cd $PTII/ptolemy/kernel/util/test java -DfileName=NamedObj.tcl -classpath ${PTII}:${PTII}/lib/ptjacl.jar:${PTII}/lib/junit-4.8.2.jar:${PTII}/lib/JUnitParams-0.3.0.jar org.junit.runner.JUnitCore ptolemy.util.test.junit.JUnitTclTest
To run all the .tcl files:
cd $PTII/ptolemy/kernel/util/test java -classpath ${PTII}:${PTII}/lib/ptjacl.jar:${PTII}/lib/junit-4.8.2.jar:${PTII}/lib/JUnitParams-0.3.0.jar org.junit.runner.JUnitCore ptolemy.kernel.util.test.JUnitTclTest
A copy of this file appears in each test/ subdirectory so that it is easy for developers to run tests. The master file is in $PTII/util/testsuite/JUnitTclTest.java.in. To update all the files, run updateJUnitTclTest.
Constructor and Description |
---|
JUnitTclTestRun() |
Modifier and Type | Method and Description |
---|---|
void |
run()
Run a test.
|
public void run() throws tcl.lang.TclException
If the fileName JVM property is set, then the file named by that property is sourced. Otherwise, the testDefs.tcl file is sourced and the doallTests Tcl proc that is defined in $PTII/util/testsuite/testDefs.tcl is invoked and then any models in the auto/ directory are invoked.
tcl.lang.TclException
- If thrown while evaluating the Tcl test code.