File tree Expand file tree Collapse file tree 5 files changed +13
-9
lines changed Expand file tree Collapse file tree 5 files changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -79,16 +79,19 @@ checks: check
7979# ########
8080# TESTS #
8181# ########
82- .PHONY : test-py coverage-py test tests
82+ .PHONY : test-py test-cpp coverage-py test tests
8383
8484TEST_ARGS :=
8585test-py : # # Clean and Make unit tests
8686 python -m pytest -v csp/tests --junitxml=junit.xml $(TEST_ARGS )
8787
88+ test-cpp : # # Make C++ unit tests
89+ for f in ./csp/tests/bin/* ; do $$ f; done || (echo " TEST FAILED" && exit 1)
90+
8891coverage-py :
8992 python -m pytest -v csp/tests --junitxml=junit.xml --cov=csp --cov-report xml --cov-report html --cov-branch --cov-fail-under=80 --cov-report term-missing $(TEST_ARGS )
9093
91- test : test-py # # run the tests
94+ test : test-cpp test- py # # run the tests
9295
9396# Alias
9497tests : test
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ dependencies:
1313 - exprtk
1414 - flex
1515 - python-graphviz
16+ - gtest
1617 - httpx
1718 - isort
1819 - libarrow=15
Original file line number Diff line number Diff line change 1- find_library (GTest REQUIRED)
1+ find_package (GTest CONFIG REQUIRED)
22
33add_executable (test_basic_allocator test_basic_allocator.cpp)
44target_link_libraries (test_basic_allocator GTest::gtest GTest::gtest_main)
55
66add_executable (test_dynamicbitset test_dynamicbitset.cpp)
7- target_link_libraries (test_dynamicbitset gtest gtest_main)
7+ target_link_libraries (test_dynamicbitset GTest:: gtest GTest:: gtest_main)
88
99add_executable (test_enum test_enum.cpp)
1010target_link_libraries (test_enum csp_core csp_engine GTest::gtest GTest::gtest_main)
@@ -16,7 +16,7 @@ add_executable(test_tagged_pointer_union test_tagged_pointer_union.cpp )
1616target_link_libraries (test_tagged_pointer_union csp_core GTest::gtest GTest::gtest_main)
1717
1818add_executable (test_time test_time.cpp )
19- target_link_libraries (test_time csp_core GTest::gtest GTest::gtest_main rt )
19+ target_link_libraries (test_time csp_core GTest::gtest GTest::gtest_main)
2020
2121
2222install (TARGETS test_basic_allocator
Original file line number Diff line number Diff line change 1- find_library (GTest REQUIRED)
1+ find_package (GTest CONFIG REQUIRED)
22
33add_executable (test_dictionary test_dictionary.cpp )
4- target_link_libraries (test_dictionary csp_engine GTest::gtest GTest::gtest_main rt )
4+ target_link_libraries (test_dictionary csp_engine GTest::gtest GTest::gtest_main)
55
66add_executable (test_tick_buffer test_tick_buffer.cpp)
77target_link_libraries (test_tick_buffer csp_engine GTest::gtest GTest::gtest_main)
88
99add_executable (test_time_series test_time_series.cpp)
10- target_link_libraries (test_time_series csp_engine_static gtest gtest_main pthread)
10+ target_link_libraries (test_time_series csp_engine GTest:: gtest GTest:: gtest_main pthread)
1111
1212add_executable (test_partial_switch_csp_type test_partial_switch_csp_type.cpp)
1313target_link_libraries (test_partial_switch_csp_type csp_engine GTest::gtest GTest::gtest_main)
Original file line number Diff line number Diff line change 1111CSP_USE_VCPKG = os .environ .get ("CSP_USE_VCPKG" , "1" ).lower () in ("1" , "on" )
1212CMAKE_OPTIONS = (
1313 ("CSP_BUILD_NO_CXX_ABI" , "0" ),
14- ("CSP_BUILD_TESTS" , "0 " ),
14+ ("CSP_BUILD_TESTS" , "1 " ),
1515 ("CSP_MANYLINUX" , "0" ),
1616 ("CSP_BUILD_KAFKA_ADAPTER" , "1" ),
1717 ("CSP_BUILD_PARQUET_ADAPTER" , "1" ),
You can’t perform that action at this time.
0 commit comments