Skip to content

Separate header file dependencies for test and src. - #364

Merged
jt2594838 merged 12 commits into
apache:developfrom
ColinLeeo:colin_cmake_refine
Mar 7, 2025
Merged

Separate header file dependencies for test and src.#364
jt2594838 merged 12 commits into
apache:developfrom
ColinLeeo:colin_cmake_refine

Conversation

@ColinLeeo

@ColinLeeoColinLeeo commented Jan 5, 2025

Copy link
Copy Markdown
Contributor

In this pr:

  1. The test code now fully relies on the installed header files from the source code rather than the source code itself, separating the outputs of the source code and test code.
  2. Removed unused code.
  3. Saved the gtest code locally, eliminating the need for remote fetching.

@ColinLeeo
ColinLeeoforce-pushed the colin_cmake_refine branch 2 times, most recently from b47f664 to ce125faCompareJanuary 6, 2025 03:16
Comment threadcpp/CMakeLists.txt Outdated
Comment threadcpp/cmake/CopyToDIr.cmake
Comment threadcpp/test/CMakeLists.txt Outdated
@ColinLeeo

ColinLeeo commented Jan 20, 2025

Copy link
Copy Markdown
ContributorAuthor

Well.. This PR introduces changes that may encounter issues in the Windows environment. Using the shared library form causes exceptions during test linking, and despite numerous attempts, the problem remains unresolved. To fix them, currently, the tests are linked to TsFile using the static linking approach. Additionally, on Windows devices, std::random_device rd; does not return random values. As a result, I have modified some test methods for obtaining random seeds.

@ColinLeeo
ColinLeeoforce-pushed the colin_cmake_refine branch 3 times, most recently from e2e5f27 to bec7294CompareMarch 4, 2025 08:24

@jt2594838jt2594838 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May add example in the root CMakeList

Comment thread.github/workflows/unit-test-cpp.yml
Comment threadcpp/test/CMakeLists.txt Outdated
COMMAND ${CMAKE_COMMAND} -E copy
"${LIBRARY_OUTPUT_PATH}/libtsfile.dll"
"$<TARGET_FILE_DIR:TsFile_Test>"
COMMENT "Copying mylib.dll to test executable directory"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mylib.dll -> libtsfile.dll

@jt2594838
jt2594838 merged commit 5dc3ee5 into apache:developMar 7, 2025
ColinLeeo added a commit to ColinLeeo/tsfile that referenced this pull request Apr 16, 2025
* Separate header file dependencies for test and src.
* fix cmake.
* fix asan in mac.
* fix some issue.
* add ci workflow.
* fix asan name.
* fix compile.
* fix compile on win.
* fix some issue.
* delete file.
* fix comments.
* add example to cmakelists.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ColinLeeo@jt2594838