Port ITT API Reference Collector to cross-platform Windows and Linux build#231
Port ITT API Reference Collector to cross-platform Windows and Linux build#231alexey-kireev wants to merge 15 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Ports the ITT API reference collector to build and run on both Windows and Linux, adding an automated smoke test to validate basic logging output.
Changes:
- Add CMake/buildall support for building
ittnotify_refcol(and an optional smoke-test executable). - Improve cross-platform behavior in the reference collector implementation (localtime handling, Windows wide-char entrypoints).
- Add CI smoke test job and update README build/usage instructions.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
src/ittnotify_refcol/tests/smoke_test.c |
Adds a small executable that exercises task + metadata APIs to produce log output. |
src/ittnotify_refcol/itt_refcol_impl.c |
Adds cross-platform localtime handling and Windows wide-char API entrypoints. |
src/ittnotify_refcol/README.md |
Documents CMake-based build and Windows usage for the reference collector. |
buildall.py |
Adds CLI flags to enable building the reference collector and smoke tests via CMake. |
CMakeLists.txt |
Introduces CMake option/targets for the reference collector shared library and smoke tests. |
.github/workflows/main.yml |
Adds a new CI job to build and run the reference collector smoke test on Linux/Windows. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| set_target_properties(ittnotify_refcol PROPERTIES | ||
| LINKER_LANGUAGE C | ||
| RUNTIME_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH} | ||
| ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}) |
| sprintf(log_file_name,"libittnotify_refcol_%d%d%d%d%d%d.log", | ||
| time_info->tm_year+1900, time_info->tm_mon+1, time_info->tm_mday, | ||
| time_info->tm_hour, time_info->tm_min, time_info->tm_sec); |
| @@ -85,6 +109,10 @@ static void ref_collector_init() | |||
| { | |||
| sprintf(file_name_buffer,"%s\\%s", temp_dir, log_file); | |||
| sprintf(file_name_buffer,"%s", log_file); | ||
| } | ||
| #else | ||
| sprintf(file_name_buffer,"/tmp/%s", log_file); |
eparshut
left a comment
There was a problem hiding this comment.
I guess we could remove old Makefile as unused
| - name: Checkout sources | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| - name: Build reference collector library and smoke test | ||
| run: python buildall.py --force_bits 64 --refcol -DITT_API_REFCOL_SMOKE_TESTS=ON ${{ runner.os == 'Windows' && '--cmake_gen ninja' || '' }} |
There was a problem hiding this comment.
This is a bad idea with pass-through -D cmake option hack.
Let's split flow into two steps: buildall.py --refcol builds only the refcol library; then in CI call cmake --build <dir> --target refcol_smoke_test builds the test explicitly.
No description provided.