001/* Run the Tcl tests under JUnit. 002 003 Copyright (c) 2010-2016 The Regents of the University of California. 004 All rights reserved. 005 Permission is hereby granted, without written agreement and without 006 license or royalty fees, to use, copy, modify, and distribute this 007 software and its documentation for any purpose, provided that the above 008 copyright notice and the following two paragraphs appear in all copies 009 of this software. 010 011 IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY 012 FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES 013 ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF 014 THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF 015 SUCH DAMAGE. 016 017 THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, 018 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 019 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE 020 PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF 021 CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, 022 ENHANCEMENTS, OR MODIFICATIONS. 023 024 PT_COPYRIGHT_VERSION_2 025 COPYRIGHTENDKEY 026 027 */ 028 029package ptolemy.util.test.junit; 030 031import org.junit.runner.RunWith; 032import org.junit.runners.Suite; 033 034/////////////////////////////////////////////////////////////////// 035//// JUnitTclTestBase 036/** 037 * Run the Tcl tests under JUnit. 038 * <p> 039 * Derived classes should have a method that calls super.run(). 040 * 041 * <p>If the fileName JVM property is set, then the file named by that property is 042 * sourced. Otherwise, the testDefs.tcl file is sourced and the doallTests Tcl 043 * proc that is defined in $PTII/util/testsuite/testDefs.tcl is invoked and then 044 * any models in the auto/ directory are invoked.</p> 045 * 046 * <p>For example, ptolemy.kernel.test.junit.JUnitTclTest extends this class. To 047 * run one test file (Port.tcl):</p> 048 * 049 * <pre> 050 * cd $PTII 051 * java -DfileName=Port.tcl -classpath ${PTII}:${PTII}/bin/ptjacl.jar:${PTII}/lib/junit-4.8.2.jar:${PTII}/lib/JUnitParams-0.3.0.jar org.junit.runner.JUnitCore ptolemy.kernel.test.junit.JUnitTclTest 052 * </pre> 053 * 054 * <p>To run all the .tcl files in the directory above this directory:</p> 055 * 056 * <pre> 057 * cd $PTII 058 * java -classpath ${PTII}:${PTII}/bin/ptjacl.jar:${PTII}/lib/junit-4.8.2.jar:${PTII}/lib/JUnitParams-0.3.0.jar org.junit.runner.JUnitCore ptolemy.kernel.test.junit.JUnitTclTest 059 * </pre> 060 * 061 * @author Christopher Brooks 062 * @version $Id$ 063 * @since Ptolemy II 10.0 064 * @Pt.ProposedRating Red (cxh) 065 * @Pt.AcceptedRating Red (cxh) 066 */ 067@RunWith(Suite.class) 068@Suite.SuiteClasses({ ptolemy.util.test.junit.TclTests.class, 069 ptolemy.util.test.junit.AutoKnownFailedTests.class, 070 ptolemy.util.test.junit.AutoNameArchTests.class, 071 ptolemy.util.test.junit.AutoTests.class 072 073}) 074public class JUnitTclTestBase { 075}