CIRCT 23.0.0git
Loading...
Searching...
No Matches
Functions | Variables
test_cpp_runtime Namespace Reference

Functions

Path|None _find_binary ()
 
list[str] _list_tests ()
 
None pytest_generate_tests (pytest.Metafunc metafunc)
 
None test_cpp_runtime (str gtest_case)
 

Variables

str _BIN_NAME = "ESIRuntimeCppTests" + (".exe" if sys.platform == "win32" else "")
 
Path|None _BINARY = _find_binary()
 
 allow_module_level
 
list[str] _ALL_TESTS = _list_tests()
 

Detailed Description

Pytest wrapper that exposes each GoogleTest case inside ESIRuntimeCppTests as
an individual pytest item.

The binary is located by (in order):
  1. The ``ESI_RUNTIME_TESTS_BIN`` environment variable (explicit override).
  2. ``tests/cpp/ESIRuntimeCppTests`` relative to the ESI runtime root, which
     is derived from the ``esiaccel`` package location — the same convention
     used by the integration tests (three ``parent`` levels up from
     ``esiaccel.__file__``).

The entire module is skipped when the binary cannot be found.

Function Documentation

◆ _find_binary()

Path | None test_cpp_runtime._find_binary ( )
protected

Definition at line 36 of file test_cpp_runtime.py.

◆ _list_tests()

list[str] test_cpp_runtime._list_tests ( )
protected
Return a list of 'Suite.TestName' strings from --gtest_list_tests.

Definition at line 71 of file test_cpp_runtime.py.

◆ pytest_generate_tests()

None test_cpp_runtime.pytest_generate_tests ( pytest.Metafunc  metafunc)

Definition at line 107 of file test_cpp_runtime.py.

◆ test_cpp_runtime()

None test_cpp_runtime.test_cpp_runtime ( str  gtest_case)

Definition at line 112 of file test_cpp_runtime.py.

Variable Documentation

◆ _ALL_TESTS

list[str] test_cpp_runtime._ALL_TESTS = _list_tests()
protected

Definition at line 100 of file test_cpp_runtime.py.

◆ _BIN_NAME

str test_cpp_runtime._BIN_NAME = "ESIRuntimeCppTests" + (".exe" if sys.platform == "win32" else "")
protected

Definition at line 33 of file test_cpp_runtime.py.

◆ _BINARY

Path | None test_cpp_runtime._BINARY = _find_binary()
protected

Definition at line 57 of file test_cpp_runtime.py.

◆ allow_module_level

test_cpp_runtime.allow_module_level

Definition at line 63 of file test_cpp_runtime.py.