Class JUnitTclTestRun


  • public class JUnitTclTestRun
    extends java.lang.Object
    Run the Tcl tests under JUnit.

    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.

    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Christopher Brooks
    Pt.AcceptedRating:
    Green (cxh)
    Pt.ProposedRating:
    Green (cxh)
    • Constructor Summary

      Constructors 
      Constructor Description
      JUnitTclTestRun()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void run()
      Run a test.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JUnitTclTestRun

        public JUnitTclTestRun()
    • Method Detail

      • run

        public void run()
                 throws tcl.lang.TclException
        Run a test.

        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.

        Throws:
        tcl.lang.TclException - If thrown while evaluating the Tcl test code.