chore(profiling): implement native test install subdirs (PROF-14200)#18488
Closed
vlad-scherbich wants to merge 1 commit into
Closed
chore(profiling): implement native test install subdirs (PROF-14200)#18488vlad-scherbich wants to merge 1 commit into
vlad-scherbich wants to merge 1 commit into
Conversation
Codeowners resolved as |
Contributor
|
Allows version-specific native test binaries to install into a subdir of the shared test/ directory (e.g. INSTALL_SUBDIR py315 -> test/py315/). build_base_venvs runs in parallel across all Python versions and GitLab merges all artifacts into a single directory for downstream jobs. Without isolation a binary compiled for pyX.Y (RPATH -> libpythonX.Y) lands in the shared test/ directory and crashes when the pytest gtest plugin tries to run it against a different Python runtime. Callers that do not pass INSTALL_SUBDIR are unaffected. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vlad-scherbich
force-pushed
the
vlad/profiling-native-test-install-subdir
branch
from
June 5, 2026 20:11
ee85127 to
3f47516
Compare
This was referenced Jun 6, 2026
Contributor
|
This pull request has been automatically closed after a period of inactivity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
← Gab's #17849 | Next → #17624
Description
Adds an optional
INSTALL_SUBDIRkeyword argument to thedd_wrapper_add_testCMakefunction in
ddtrace/internal/datadog/profiling/stack/test/CMakeLists.txt.When specified, the test binary is installed to
test/<subdir>/instead of the sharedtest/directory. Without the keyword, behavior is identical to before.Motivation:
build_base_venvsin GitLab CI runs as a parallel matrix across all Pythonversions, and GitLab merges all job artifacts into a single directory for downstream jobs.
A version-specific test binary (e.g. one compiled against
libpython3.15) placed in theshared
test/directory will be picked up by the pytest gtest plugin in a py3.10 testenvironment and crash immediately — reported as a silent "C++ failure" with no test output.
INSTALL_SUBDIR py315(used in the next PR in the stack) isolates py3.15-only testbinaries so this collision cannot happen.
Also adds
cmakeformat_fixscript tohatch.toml(needed by the07-run-cmake-formatpre-commit hook) and updates
hooks/README.mdto document the in-place formatting +re-stage behavior.
Part of the Python 3.15 support stack. Relates to #17809.
Testing
test_thread_span_links,test_cpython_layout_contracts) — they calldd_wrapper_add_testwithoutINSTALL_SUBDIRand install to the sametest/path as before.INSTALL_SUBDIRkeyword is exercised in the next PR (vlad/ddtracepy-315-profiling-only), wheretest_frame_state_315usesINSTALL_SUBDIR py315.Risks
None. The CMake function change is backward-compatible:
INSTALL_SUBDIRis optional and the default path is unchanged.Additional Notes
cmake_parse_argumentsseparates the keyword from source file arguments via_ARG_UNPARSED_ARGUMENTS, so adding the keyword does not affect how source files are passed toadd_executable.dd_wrapper/test/CMakeLists.txtif that test directory ever needs similar isolation.