Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,19 @@ checks: check
#########
# TESTS #
#########
.PHONY: test-py coverage-py test tests
.PHONY: test-py test-cpp coverage-py test tests

TEST_ARGS :=
test-py: ## Clean and Make unit tests
python -m pytest -v csp/tests --junitxml=junit.xml $(TEST_ARGS)

test-cpp: ## Make C++ unit tests
for f in ./csp/tests/bin/*; do $$f; done || (echo "TEST FAILED" && exit 1)

coverage-py:
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)

test: test-py ## run the tests
test: test-cpp test-py ## run the tests

# Alias
tests: test
Expand Down
1 change: 1 addition & 0 deletions conda/dev-environment-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies:
- exprtk
- flex
- python-graphviz
- gtest
- httpx
- isort
- libarrow=15
Expand Down
6 changes: 3 additions & 3 deletions cpp/tests/core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
find_library(GTest REQUIRED)
find_package(GTest CONFIG REQUIRED)

add_executable(test_basic_allocator test_basic_allocator.cpp)
target_link_libraries(test_basic_allocator GTest::gtest GTest::gtest_main)

add_executable(test_dynamicbitset test_dynamicbitset.cpp)
target_link_libraries(test_dynamicbitset gtest gtest_main)
target_link_libraries(test_dynamicbitset GTest::gtest GTest::gtest_main)

add_executable(test_enum test_enum.cpp)
target_link_libraries(test_enum csp_core csp_engine GTest::gtest GTest::gtest_main)
Expand All @@ -16,7 +16,7 @@ add_executable(test_tagged_pointer_union test_tagged_pointer_union.cpp )
target_link_libraries(test_tagged_pointer_union csp_core GTest::gtest GTest::gtest_main)

add_executable(test_time test_time.cpp )
target_link_libraries(test_time csp_core GTest::gtest GTest::gtest_main rt)
target_link_libraries(test_time csp_core GTest::gtest GTest::gtest_main)


install(TARGETS test_basic_allocator
Expand Down
6 changes: 3 additions & 3 deletions cpp/tests/engine/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
find_library(GTest REQUIRED)
find_package(GTest CONFIG REQUIRED)

add_executable(test_dictionary test_dictionary.cpp )
target_link_libraries(test_dictionary csp_engine GTest::gtest GTest::gtest_main rt)
target_link_libraries(test_dictionary csp_engine GTest::gtest GTest::gtest_main)

add_executable(test_tick_buffer test_tick_buffer.cpp)
target_link_libraries(test_tick_buffer csp_engine GTest::gtest GTest::gtest_main)

add_executable(test_time_series test_time_series.cpp)
target_link_libraries(test_time_series csp_engine_static gtest gtest_main pthread)
target_link_libraries(test_time_series csp_engine GTest::gtest GTest::gtest_main pthread)

add_executable(test_partial_switch_csp_type test_partial_switch_csp_type.cpp)
target_link_libraries(test_partial_switch_csp_type csp_engine GTest::gtest GTest::gtest_main)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
CSP_USE_VCPKG = os.environ.get("CSP_USE_VCPKG", "1").lower() in ("1", "on")
CMAKE_OPTIONS = (
("CSP_BUILD_NO_CXX_ABI", "0"),
("CSP_BUILD_TESTS", "0"),
("CSP_BUILD_TESTS", "1"),
("CSP_MANYLINUX", "0"),
("CSP_BUILD_KAFKA_ADAPTER", "1"),
("CSP_BUILD_PARQUET_ADAPTER", "1"),
Expand Down