![]() |
lingua-franca 0.10.1
Lingua Franca code generator
|
Collection of tests for the Python target. More...
Inherits org.lflang.tests.RuntimeTest.
Public Member Functions | |
| PythonTest () | |
| void | runAsFederated () |
| void | runBasicTests () |
| void | runConcurrentTests () |
| void | runDockerFederatedTests () |
| Run federated docker tests, provided that the platform is Linux, the target supports Docker, and the target supports federated execution. | |
| void | runDockerTests () |
| Run docker tests, provided that the platform is Linux and the target supports Docker. | |
| void | runEnclaveTests () |
| Run enclave tests if the target supports enclaves. | |
| void | runFederatedTests () |
| void | runGenericsTests () |
| void | runModalTests () |
| Run the tests for modal reactors. | |
| void | runMultiportTests () |
| void | runNoInliningTests () |
| Run the tests for non-inlined reaction bodies. | |
| void | runTargetSpecificTests () |
| void | runWithThreadingOff () |
Static Public Member Functions | |
| static boolean | compatibleWithThreadingOff (TestCategory category) |
| Given a test category, return true if it is compatible with single-threaded execution. | |
| static TestLevel | pathToLevel (Path path) |
| Static function for converting a path to its associated test level. | |
| static void | runSingleTestAndPrintResults (LFTest test, Class<? extends TestBase > testClass, TestLevel level) |
| Run a test, print results on stderr. | |
| static String | stackTraceToString (Throwable t) |
Static Public Attributes | |
| static final String | THICK_LINE |
| Content separator used in test output, 78 characters wide. | |
| static final String | THIN_LINE |
| Content separator used in test output, 78 characters wide. | |
Protected Member Functions | |
| void | applyDefaultConfiguration (TargetConfig config) |
| Adjust target configuration for all runs of this test class. | |
| ProcessBuilder | getExecCommand (LFTest test) throws TestError |
| Return a preconfigured ProcessBuilder for executing the test program. | |
| GeneratorArguments | getGeneratorArguments () |
| Return generator arguments suitable for testing. | |
| final void | runTestsAndPrintResults (Target target, Predicate< TestCategory > selected, TestLevel level, Transformer transformer, Configurator configurator, boolean copy) |
| Run selected tests for a given target and configurator up to the specified level. | |
| void | runTestsFor (List< Target > subset, String description, Predicate< TestCategory > selected, Transformer transformer, Configurator configurator, TestLevel level, boolean copy) |
| Run tests in the given selection for a subset of given targets. | |
| void | runTestsForTargets (String description, Predicate< TestCategory > selected, Transformer transformer, Configurator configurator, TestLevel level, boolean copy) |
| Run tests in the given selection for all targets enabled in this class. | |
| boolean | supportsDockerOption () |
Whether to enable runDockerTests() and runDockerFederatedTests(). | |
| boolean | supportsEnclaves () |
Whether to enable runEnclaveTests(). | |
| boolean | supportsFederatedExecution () |
Whether to enable runFederatedTests(). | |
| boolean | supportsGenericTypes () |
Whether to enable runGenericsTests(). | |
| boolean | supportsSingleThreadedExecution () |
| Whether to enable threading. | |
Static Protected Member Functions | |
| static boolean | isLinux () |
| Determine whether the current platform is Linux. | |
| static boolean | isMac () |
| Determine whether the current platform is MacOS. | |
| static boolean | isWindows () |
| Determine whether the current platform is Windows. | |
| static void | printTestHeader (Target target, String description) |
| Print a header that describes a collection of tests. | |
Package Attributes | |
| JavaIoFileSystemAccess | fileAccess |
| LFGenerator | generator |
| Provider< ResourceSet > | resourceSetProvider |
| TestRegistry | testRegistry |
| IResourceValidator | validator |
Collection of tests for the Python target.
Even though all tests are implemented in the base class, we override them here so that each test can be easily invoked individually from IDEs with JUnit support like Eclipse and IntelliJ. This is typically done by right-clicking on the name of the test method and then clicking "Run".
| org.lflang.tests.runtime.PythonTest.PythonTest | ( | ) |
|
protected |
Adjust target configuration for all runs of this test class.
Reimplemented from org.lflang.tests.TestBase.
|
staticinherited |
Given a test category, return true if it is compatible with single-threaded execution.
|
protectedinherited |
Return a preconfigured ProcessBuilder for executing the test program.
| test | The test to get the execution command for. |
Reimplemented in org.lflang.tests.runtime.CPatmosTest.
|
protectedinherited |
Return generator arguments suitable for testing.
|
staticprotectedinherited |
Determine whether the current platform is Linux.
|
staticprotectedinherited |
Determine whether the current platform is MacOS.
|
staticprotectedinherited |
Determine whether the current platform is Windows.
|
staticinherited |
Static function for converting a path to its associated test level.
|
staticprotectedinherited |
Print a header that describes a collection of tests.
| target | The target for which the tests are being performed. |
| description | A string the describes the collection of tests. |
| void org.lflang.tests.runtime.PythonTest.runAsFederated | ( | ) |
Reimplemented from org.lflang.tests.RuntimeTest.
| void org.lflang.tests.runtime.PythonTest.runBasicTests | ( | ) |
Reimplemented from org.lflang.tests.RuntimeTest.
| void org.lflang.tests.runtime.PythonTest.runConcurrentTests | ( | ) |
Reimplemented from org.lflang.tests.RuntimeTest.
| void org.lflang.tests.runtime.PythonTest.runDockerFederatedTests | ( | ) |
Run federated docker tests, provided that the platform is Linux, the target supports Docker, and the target supports federated execution.
If any of these requirements are not met, skip the tests.
Reimplemented from org.lflang.tests.RuntimeTest.
| void org.lflang.tests.runtime.PythonTest.runDockerTests | ( | ) |
Run docker tests, provided that the platform is Linux and the target supports Docker.
Skip if platform is not Linux or target does not support Docker.
Reimplemented from org.lflang.tests.RuntimeTest.
|
inherited |
Run enclave tests if the target supports enclaves.
Reimplemented in org.lflang.tests.runtime.CTest.
| void org.lflang.tests.runtime.PythonTest.runFederatedTests | ( | ) |
Reimplemented from org.lflang.tests.RuntimeTest.
|
inherited |
Reimplemented in org.lflang.tests.runtime.CTest, and org.lflang.tests.runtime.RustTest.
|
inherited |
Run the tests for modal reactors.
Reimplemented in org.lflang.tests.runtime.CTest.
| void org.lflang.tests.runtime.PythonTest.runMultiportTests | ( | ) |
Reimplemented from org.lflang.tests.RuntimeTest.
|
inherited |
Run the tests for non-inlined reaction bodies.
Reimplemented in org.lflang.tests.runtime.CTest.
|
staticinherited |
Run a test, print results on stderr.
| test | Test case. |
| testClass | The test class that will execute the test. This is target-specific, it may provide some target-specific configuration. We pass a class and not a new instance because this method needs to ensure the object is properly injected, and so, it needs to control its entire lifecycle. |
| level | Level to which to run the test. |
| void org.lflang.tests.runtime.PythonTest.runTargetSpecificTests | ( | ) |
Reimplemented from org.lflang.tests.RuntimeTest.
|
protectedinherited |
Run selected tests for a given target and configurator up to the specified level.
| target | The target to run tests for. |
| selected | A predicate that given a test category returns whether it should be included in this test run or not. |
| level | The test level. |
| transformer | The transformer to apply to tests. |
| configurator | A procedure for configuring the tests. |
| copy | Whether to work on copies of tests in the test. registry. |
|
protectedinherited |
Run tests in the given selection for a subset of given targets.
| subset | The subset of targets to run the selected tests for. |
| description | A string that describes the collection of tests. |
| selected | A predicate that given a test category returns whether it should be included in this test run or not. |
| transformer | The transformer to apply to tests. |
| configurator | A procedure for configuring the tests. |
| level | The test level. |
| copy | Whether to work on copies of tests in the test. registry. |
|
protectedinherited |
Run tests in the given selection for all targets enabled in this class.
| description | A string that describes the collection of tests. |
| selected | A predicate that given a test category returns whether it should be included in this test run or not. |
| transformer | The transformer to apply to tests. |
| configurator | A procedure for configuring the tests. |
| level | The test level. |
| copy | Whether to work on copies of tests in the test. registry. |
|
inherited |
Reimplemented in org.lflang.tests.runtime.CTest.
|
staticinherited |
|
protected |
Whether to enable runDockerTests() and runDockerFederatedTests().
Reimplemented from org.lflang.tests.RuntimeTest.
|
protectedinherited |
Whether to enable runEnclaveTests().
Reimplemented in org.lflang.tests.runtime.CppTest, and org.lflang.tests.runtime.CTest.
|
protected |
Whether to enable runFederatedTests().
Reimplemented from org.lflang.tests.RuntimeTest.
|
protectedinherited |
Whether to enable runGenericsTests().
Reimplemented in org.lflang.tests.runtime.RustTest.
|
protected |
Whether to enable threading.
Reimplemented from org.lflang.tests.TestBase.
|
packageinherited |
|
packageinherited |
|
packageinherited |
|
packageinherited |
|
staticinherited |
Content separator used in test output, 78 characters wide.
|
staticinherited |
Content separator used in test output, 78 characters wide.
|
packageinherited |