/* Run the Ptolemy model tests in the auto32/ directory using JUnit. Copyright (c) 2013-2014 The Regents of the University of California. All rights reserved. Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following two paragraphs appear in all copies of this software. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. PT_COPYRIGHT_VERSION_2 COPYRIGHTENDKEY */ package ptolemy.util.test.junit; import java.io.IOException; import java.lang.reflect.Method; import junitparams.JUnitParamsRunner; import junitparams.Parameters; import org.junit.Test; import org.junit.runner.RunWith; import ptolemy.util.StringUtilities; /////////////////////////////////////////////////////////////////// //// Auto32Tests /** * Run the Ptolemy model tests in the auto/ directory using JUnit. * *
* This test must be run from the directory that contains the auto/ directory, * for example: *
* ** (cd ~/ptII/ptolemy/actor/lib/io/test; java -classpath ${PTII}:${PTII}/lib/junit-4.8.2.jar:${PTII}/lib/JUnitParams-0.3.0.jar org.junit.runner.JUnitCore ptolemy.util.test.junit.AutoTests) ** *
* This test uses JUnitParams from http://code.google.com/p/junitparams/, which is released under Apache License * 2.0. *
* * @author Christopher Brooks * @version $Id: Auto32Tests.java 70402 2014-10-23 00:52:20Z cxh $ * @since Ptolemy II 10.0 * @Pt.ProposedRating Red (cxh) * @Pt.AcceptedRating Red (cxh) */ @RunWith(JUnitParamsRunner.class) public class Auto32Tests extends ModelTests { /** * Return a two dimensional array of arrays of strings that name the model * to be executed. If auto/ does not exist, or does not contain files that * end with .xml or .moml, return a list with one element that contains * the value of the THERE_ARE_NO_AUTO_TESTS variable. * * @return The List of model names in auto/ * @exception IOException If there is a problem accessing the auto/ directory. */ @Override public Object[] modelValues() throws IOException { return modelValues("auto32/", THERE_ARE_NO_AUTO_TESTS); } /** * Execute a model. Timeout after 140000 ms. * *To check the time, go to the list of tests for AutoTest, for example
* http://sisyphus.eecs.berkeley.edu:8079/hudson/job/ptII/724/testReport/ptolemy.util.test.junit/AutoKnownFailedTests/
,
* where 724 is a recent run of the build. Look for thhe longest
* passing test, typically OpenModelicaInteractive (15 sec.), and
* round up by a factor of 10 because 15 sec. is so small, then
* round down so that the time is different from
* AutoKnownFailedTests.