10000 gh-104280: Add test cases for DTrace probes by furkanonder · Pull Request #107125 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-104280: Add test cases for DTrace probes #107125

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 31, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
10000 Diff view
Diff view
Prev Previous commit
Check --with-dtrace configuration option
  • Loading branch information
furkanonder committed Jul 26, 2023
commit 626b1cf0ec58f80a24756d840678ce158de50be1
12 changes: 8 additions & 4 deletions Lib/test/test_dtrace.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import re
import subprocess
import sys
import sysconfig
import types
import unittest

Expand Down Expand Up @@ -173,13 +174,16 @@ class SystemTapOptimizedTests(TraceTests, unittest.TestCase):
backend = SystemTapBackend()
optimize_python = 2


class CheckDtraceProbes(unittest.TestCase):
@classmethod
def setUpClass(cls):
readelf_major_version, readelf_minor_version = cls.get_readelf_version()
if support.verbose:
print(f"readelf version: {readelf_major_version}.{readelf_minor_version}")
if sysconfig.get_config_var('WITH_DTRACE'):
readelf_major_version, readelf_minor_version = cls.get_readelf_version()
if support.verbose:
print(f"readelf version: {readelf_major_version}.{readelf_minor_version}")
else:
raise unittest.SkipTest("CPython must be configured with the --with-dtrace option.")


@staticmethod
def get_readelf_version():
Expand Down
0