Add testProcess{Config} task to accept user options#581
Conversation
…ptions argument to tests
CI Test ResultsRun: #27035668904 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 32 | Passed: 32 | Failed: 0 Updated: 2026-06-05 19:45:33 UTC |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6f5c7bae36
ℹ️ About Codex in GitHub
Your team has set up Codex to 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 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| String userOptions = System.getProperty("ddprof.test.options"); | ||
| if (userOptions != null && !userOptions.isEmpty()) { | ||
| profilerCommand = mergeProfilerOptions(profilerCommand, userOptions); |
There was a problem hiding this comment.
Apply profiler options to all profiler starts
When testProcessDebug is run without -Ptests, this system property is only consumed by AbstractProfilerTest; tests that call JavaProfiler.execute(...) directly still start the profiler with their hard-coded commands (for example ShutdownTest.runTest and OtelContextStorageModeTest). That means a process run requested with -Pprofiler.options=fjmethodid=false still exercises part of the suite with the default profiler options, so it is not a reliable way to validate that option across the task's full test set.
Useful? React with 👍 / 👎.
What does this PR do?:
This PR adds a new task for testing, that accepts user options.
Motivation:
The task is created for testing new feature that avoids preloading all jmethod ids. By default, the feature is disabled and has to be enabled via
fjmethodid=falseargument, which is not possible with currenttestdebug/releasetasks.Additional Notes:
How to test the change?:
Run
./gradlew Pprofiler.options=fjmethodid=false testProcessDebug,fjmethodid=falseis merged into command line that print out by tests.For example:
For Datadog employees:
credentials of any kind, I've requested a review from
@DataDog/security-design-and-guidance.Unsure? Have a question? Request a review!