Repository navigation
Build the gtest helper libraries again - #837
Conversation
The gtest plugin's buildNativeLibs task builds the helper DSOs under src/test/resources/native-libs, but its onlyIf requires nativeLibsSourceDir and nativeLibsOutputDir to be set, and neither has a convention nor was set by ddprof-lib. The task has therefore been skipped since the move to the Kotlin build-logic (#358), and tests that need those DSOs found them missing and exited early. Set both directories in the ddprof-lib gtest block so the DSOs are built before the gtest tasks run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f4d2382edc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
The CI gtest jobs run buildGtest{Config}, which only compiles and links,
and then execute the binaries directly. buildNativeLibs was wired only
into the gtest{Config}_{Test} run tasks, so those jobs never built the
helper DSOs the binaries load. Make buildGtest{Config} depend on it as
well.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI Test ResultsRun: #37331869958 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 32 | Passed: 32 | Failed: 0 Updated: 2026-10-05 15:40:56 UTC |
Reliability & Chaos Results✅ All reliability & chaos checks passed Pipeline: https://gitlab.ddbuild.io/DataDog/java-profiler/-/pipelines/142411689 |
What does this PR do?:
Sets
nativeLibsSourceDirandnativeLibsOutputDirin theddprof-libgtest block, sobuildNativeLibsruns again and builds the helper DSOs undersrc/test/resources/native-libsbefore the gtest tasks.Motivation:
buildNativeLibshas been skipped on every build since the Kotlin build-logic migration (#358). ItsonlyIfrequires both directory properties, but neither has a convention andddprof-libnever set them. So the helper libraries (reladyn-lib,small-lib,unresolved-functions) were never built, and tests that depend on them found them missing and exited early.The fix for PROF-16135 (stacked on this PR) adds a gtest that needs such a DSO. That's what turned this up.
Additional Notes:
buildNativeLibs. Its Makefiles hardcodegcc/g++, and the task throws if any Makefile fails. These libraries have not been built on aarch64, musl or the sanitizer images since Migrate build system to Kotlin build-logic #358, so this PR's CI run is the first time they are. Please watch those jobs in particular.elfparser_ut's resource tests run. They resolve their DSOs relative to the working directory (cwd/../build/...), which doesn't match under Gradle (cwd isddprof-lib), so they still bail out with exit 0. That's a separate, pre-existing issue, left for a follow-up.How to test the change?:
./gradlew :ddprof-lib:gtestDebug -inow shows> Task :ddprof-lib:buildNativeLibsexecuting instead ofSKIPPED, and the DSOs appear underddprof-lib/build/test/resources/native-libs/. Verified locally on linux-x64 (glibc 2.35).For Datadog employees:
credentials of any kind, I've requested a security review (run the
dd:platform-security-reviewskill, or file a request via the PSEC review form).
bewairealso runs automatically on every PR.🤖 Generated with Claude Code