Package ptolemy.util.test.junit
Class AutoNameArchTests
- java.lang.Object
-
- ptolemy.util.test.junit.ModelTests
-
- ptolemy.util.test.junit.AutoTests
-
- ptolemy.util.test.junit.AutoNameArchTests
-
public class AutoNameArchTests extends AutoTests
Run the Ptolemy model tests in the auto/os.name-os.arch directory using JUnit.The name is based on the value of the os.name Java property, but spaces have been removed and the results converted to lower case. The value of the os.arch property is not modified. Valid directory names are macosx-x86_64 and linux-amd64.
This test must be run from the directory that contains the auto/os.name directory, for example:
(cd ~/ptII/ptolemy/actor/lib/fmi/fmus/jmodelica/test; java -classpath ${PTII}:${PTII}/lib/jna-4.0.0-variadic.jar:${PTII}/lib/junit-4.8.2.jar:${PTII}/lib/JUnitParams-0.3.0.jar org.junit.runner.JUnitCore ptolemy.util.test.junit.AutoNameArchTests)
This test uses JUnitParams from http://code.google.com/p/junitparams/, which is released under Apache License 2.0.
- Since:
- Ptolemy II 11.0
- Version:
- $Id$
- Author:
- Christopher Brooks
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Red (cxh)
-
-
Field Summary
-
Fields inherited from class ptolemy.util.test.junit.AutoTests
_jsAccessorClass, _jsAccessorReloadAllAccessorsMethod
-
Fields inherited from class ptolemy.util.test.junit.ModelTests
_applicationClass, _applicationConstructor, _applicationToplevelMethod, THERE_ARE_NO_AUTO_ARCH_TESTS, THERE_ARE_NO_AUTO_TESTS, THERE_ARE_NO_KNOWN_FAILED_TESTS
-
-
Constructor Summary
Constructors Constructor Description AutoNameArchTests()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
autoNameArch()
Return the auto directory for the current architecture, for example "macosx-x86_64/".java.lang.Object[]
modelValues()
Return a two dimensional array of arrays of strings that name the model to be executed.void
RunModel(java.lang.String fullPath)
Execute a model and time out after 900000 ms.-
Methods inherited from class ptolemy.util.test.junit.AutoTests
afterClass, delayIfNecessary, modelFileIsOK
-
Methods inherited from class ptolemy.util.test.junit.ModelTests
modelValues
-
-
-
-
Method Detail
-
RunModel
public void RunModel(java.lang.String fullPath) throws java.lang.Throwable
Execute a model and time out after 900000 ms.- Overrides:
RunModel
in classAutoTests
- Parameters:
fullPath
- The full path to the model file to be executed. If the fullPath ends with the value of theModelTests.THERE_ARE_NO_AUTO_TESTS
, then the method returns immediately.- Throws:
java.lang.Throwable
- If thrown while executing the model.
-
modelValues
public java.lang.Object[] modelValues() throws java.io.IOException
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.- Overrides:
modelValues
in classModelTests
- Returns:
- The List of model names in auto/
- Throws:
java.io.IOException
- If there is a problem accessing the auto/ directory.
-
autoNameArch
public static java.lang.String autoNameArch()
Return the auto directory for the current architecture, for example "macosx-x86_64/".- Returns:
- the auto directory for the current architecture.
-
-