gh-98894: Skip dtrace tests when building without dtrace#152239
Conversation
|
cc @vstinner |
|
On a Python built without
Hum, I'm not sure that it's worth it to run this single test on a Python built without Instead, I suggest running the check at the module top-level and remove the check from CheckDtraceProbes.setUpClass(). Something like: if not support.has_subprocess_support:
raise unittest.SkipTest("test module requires subprocess")
if not sysconfig.get_config_var('WITH_DTRACE'):
raise unittest.SkipTest(
"CPython must be configured with the --with-dtrace option."
)So the whole test is skipped: |
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I prefer this simpler change!
|
Note: try to avoid |
|
Thanks @stratakis for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
GH-152300 is a backport of this pull request to the 3.15 branch. |
|
GH-152301 is a backport of this pull request to the 3.14 branch. |
|
GH-152302 is a backport of this pull request to the 3.13 branch. |
Skip functional test_dtrace cases when CPython was not configured with --with-dtrace.