Commit Graph
87 Commits
Author SHA1 Message Date
Ingmar Schoegl 36cd3adca6 [SCons] Remove unittest specific code 2022-01-16 12:25:35 -05:00
Ray Speth b3f1a73663 [Test] Skip conversion tests if no Python package is being built
Converting between different mechanism formats require at least
the "minimal" Python package to be built.
2021-09-16 21:00:45 -04:00
Anthony Walker b920d62409 Adding a test for single reactor initialize fix.
I adapted the example ./interfaces/cython/cantera/test_reactor.py::test_equilibrium_HP to C++ and performed the reactor initialization with an arbitrary value to show that it no longer creates a segmentation fault and also still integrates successfully in a network post individual initialization. I added this to it's own folder called zeroD because I could not find C++ instances of Reactor tests elsewhere.
2021-06-26 12:19:26 -04:00
Ingmar Schoegl cdc57b0610 [SCons] Add verbose_tests flag 2021-06-14 12:33:49 -06:00
Ingmar Schoegl 548b2f1afe [CI] Hide longest test durations by default 2021-06-14 12:33:49 -06:00
Ray Speth 19f1593476 [Test] Add ability to skip slow GTest tests 2021-05-09 18:08:11 -04:00
Ray Speth 2ffde3b8f4 [Test] Add option to skip slow (Python) tests
Use to speed up CI coverage testing
2021-05-09 18:08:11 -04:00
Bryan Weber 27696feab8 Rename mglob function to multi_glob 2021-05-04 21:36:21 -04:00
Bryan Weber edf5e4cc77 Limit exported functions from buildutils
Each SConscript module imports what it needs from the stdlib.
2021-05-04 21:36:21 -04:00
Bryan Weber 83eacc021d Rename print_report and test_results to snake case 2021-05-04 21:36:21 -04:00
Ray Speth 4db9e2cfc2 [Test] Parse pytest results with SCons 2021-04-28 17:11:51 -04:00
Bryan W. Weber 8920063fc9 [Test/SCons] Add fast failure option for tests
Add fast_fail_tests option. If True, the first test failure aborts
running the test suite. Useful when debugging tests and multiple tests
are failing, this option allows them to be easily handled one-by-one.
2020-01-01 22:14:42 -05:00
Ray Speth 0f1da269fc [SCons] Simplify handling of PYTHONPATH in the test suite 2018-09-19 17:59:59 -04:00
Ray Speth d6da006e3e [SCons] Only build the Python package for Python 3.x 2018-09-19 17:59:59 -04:00
Ray Speth 677efd82d5 [Test/Matlab] Collect pass/fail data for individual tests 2018-07-30 11:25:27 -04:00
Ray Speth bdaabc0428 [Test/Matlab] Improve behavior when Matlab tests fail
Outright failures of the Matlab test suite which result in the test log file not
being written no longer cause SCons to abort. Instead, they are logged as a
major test failure, similar to the behavior of the Python test suite.
2018-07-30 11:25:27 -04:00
Ray Speth 333d388f90 [SCons] Improve transition from system_googletest to googletest option 2018-07-09 15:24:25 -04:00
Ray Speth 9bad354553 Mark googletest-based tests as failures if googletest is not available 2018-07-09 15:24:25 -04:00
band-a-prend fb4a36b1ca [SCons] implement 'googletest' option
New scons build option introduced to replace 'system_googletest'
and allow to not use 'googletest' module while running test
(all tests that require this module could be omited)

New option description:
'googletest',

"""Select whether to use gtest/gmock from system
   installation ('system'), from a Git submodule ('submodule'), to decide
   automatically ('default') or don't look for gtest/gmock ('none')
   and don't run tests that depend on gtest/gmock.
   If this option is set then it suppress the deprecated 'system_googletest' option."""

Old option is still presented and mentioned as 'deprecated'.
Option 'googletest' supresses the old 'system_googletest' one.
2018-07-09 15:24:25 -04:00
Bryan W. Weber 94ea9b585f Update SConstruct to recognize that Python 3 might be running SCons
Update and make more consistent the specification of Python package
building. Since SCons can be run by Python 3 now, we cannot assume that
the Python running SCons is Python 2. This changes a bunch of
assumptions in SConstruct about where things should be built or
installed. This commit addresses those assumptions by making the options
for Python 2 and Python 3 symmetric.
2017-11-26 16:48:40 -05:00
Bryan W. Weber 1635cd2e04 Use the minimal Python interface for tests when others are not built
If no full or minimal Python interface is being built, copy the minimal
interface into the build directory and use the sys.executable to run it,
so the tests that require CTML or CTI conversion can run.
2017-11-26 16:48:40 -05:00
Evan McCorkle 60d2075492 Update to gtest-1.8.0.
This release included the merger of gtest and gmock. Cantera is now
building gmock in addition to gtest in order to take advantage of
gmock matchers.
2017-10-28 20:07:14 -04:00
Ray Speth 7d0bc71448 [SCons] Make build scripts compatible with SCons 3.0.0 and Python 3 2017-10-05 13:48:54 -04:00
Ray Speth 7020fa72bf [Transport] Make SimpleTransport constructible without XML 2017-08-15 17:54:15 -04:00
Ray Speth 461b63e462 [SCons] Add option to pass flags to GTest 2017-02-22 22:18:40 -05:00
Ray Speth fca22d94e5 [SCons] Print error message if GTest exits abnormally 2017-02-22 22:18:40 -05:00
Ray Speth 70e10632d4 [SCons] Fix implicit dependencies on 'build' step
The 'install' and 'test' targets had some undeclared dependencies on the 'build'
target, such that running 'scons install' or 'scons test' without having first
run 'scons build' would result in incomplete installation or test failures,
respectively.

Fixes #432.
2017-02-17 11:51:12 -05:00
Ray Speth a7db9a7411 Fix LD_LIBRARY_PATH order when running tests
build/lib needs to be first in case LD_LIBRARY_PATH contains another Cantera
installation.

Resolves #310.
2015-11-22 17:04:05 -05:00
Ray Speth 4a411b76bb Use git submodule for googletest 2015-10-18 18:54:09 -04:00
Ray Speth e4c45b6429 General whitespace cleanup
Remove unnecessary blank lines and trailing whitespace. Replace tabs with
spaces.
2015-08-02 23:06:15 -04:00
Ray Speth c446686c85 [SCons] Fix test summary when tests are run in parallel 2015-06-19 11:53:07 -04:00
Ray Speth c2344377ac [Test] Move "ChemEquil_red1" to GTest suite
The old version of this test didn't actually check any meaninful results. The
ChemEquil and VCS solvers are both able to solve this problem, but the
MultiPhase solver currently fails. Also, the BasisOptimize function may fail
depending on the order that the elements are specified in the input file.
2015-06-16 16:16:21 -04:00
Ray Speth 44a99de4e0 [Test] Add tests for manually-constructed Transport objects 2015-01-13 23:06:59 +00:00
Ray Speth 74a522bdda [Test] Add tests for parseCompString
These tests are added as the first part of the new gtest test suite 'general'
2014-11-07 02:14:54 +00:00
Ray Speth 0fd5f14288 [SCons] Rename 'cython' test suite to 'python'
Since the old Python module is gone, we don't need this one to have a different
name.
2014-11-01 00:13:41 +00:00
Ray Speth 044235c065 [SCons] Remove unnecessary uses of pjoin 2014-10-08 16:54:49 +00:00
Ray Speth 0db18ad0b1 [SCons/Test] Re-run tests if shared library changes 2014-10-08 16:54:39 +00:00
Ray Speth 6d4271fdfe [Test] Improve visibility of total test suite failures
Treat crashes when running the GTest test programs and the Python test suite as
being more severe than individual test failures.
2014-10-03 22:15:06 +00:00
Ray Speth 1a5f75dd2d [Test] Use Cantera shared library for tests, when possible
On Linux systems, link tests against the Cantera shared library, rather than the
static library to reduce the size of the compiled test suite. This saves over 1
GB of disk space when compiling with debug symbols enabled, and also reduces the
run time of the test suite.

This does not work on Windows, where the shared library only exports the Cantera
C interface.
2014-10-01 17:52:21 +00:00
Ray Speth 4544fd3392 [Test] Build tests with optimization disabled
Compiling the tests takes longer than running them, so it actually saves time to
compile the tests with optimizations disabled.
2014-10-01 17:52:18 +00:00
Ray Speth 53102e8d70 [Test] Convert 'fracCoeff' test to GTest 2014-09-26 13:45:06 +00:00
Ray Speth 992782d1e2 [Test] Show test class and test name for failing GTest tests 2014-09-26 13:45:02 +00:00
Ray Speth f8ee065368 [Test] Fix test status report if Python test crashes 2014-04-08 16:27:01 +00:00
Ray Speth 1fd98a2f08 [Test] Allow 'runCythonTests' to be called from any working directory 2014-03-24 04:03:35 +00:00
Ray Speth 3eba9641ab [SCons] Continue running test suite if Python tests crash
If the Python test suite crashes, it won't save a results file, but we can still
run the rest of the tests and report this specific failure.
2014-03-17 02:05:17 +00:00
Ray Speth 338a54f101 [SCons] Simplify implementation of changes in r2810
Use the correct platform-independent path separator instead of assuming that it
is ':'.

Determine the PYTHONPATH variable in a single place for each Python version.
2014-03-17 02:05:09 +00:00
Harry Moffat 3d5aa42e77 Fixed the LD_LIBRARY_PATH and PYTHONPATH specifications for scons's test suite on multiuser linux boxes.
The user's environmental variables are now passed down to the tests. Previously they had been ignored.
All of the python tests (minimal and full) had been failing for over a year or so for any installations which actually use the
LD_LIBRARY_PATH and PYTHONPATH environmental variables, which pretty much consists of all multiuser linux
machines.
2014-03-14 23:56:55 +00:00
Ray Speth 30bf2c806f [Scons/Test] Allow test suite to continue if gtest crashes
If a gtest program crashes, register that as a single test failure.
Previously, the entire test suite would be aborted because the
attempt to open the test results file (gtest-foo.xml) would fail.
2014-03-05 03:25:19 +00:00
Ray Speth 16927ae538 [SCons] Workaround for SCons bug under Cygwin
See SCons Issue 2911.
http://scons.tigris.org/issues/show_bug.cgi?id=2911
2014-02-20 03:01:05 +00:00
Ray Speth 43360663c2 [SCons/Test] Include GTest unit tests individually in test result summary 2014-02-06 22:59:10 +00:00