We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40bc704 commit a6e29a2Copy full SHA for a6e29a2
Lib/test/test_perfmaps.py
@@ -1,16 +1,20 @@
1
import os
2
-import sys
+import sysconfig
3
import unittest
4
5
try:
6
from _testinternalcapi import perf_map_state_teardown, write_perf_map_entry
7
except ImportError:
8
raise unittest.SkipTest("requires _testinternalcapi")
9
10
+def supports_trampoline_profiling():
11
+ perf_trampoline = sysconfig.get_config_var("PY_HAVE_PERF_TRAMPOLINE")
12
+ if not perf_trampoline:
13
+ return False
14
+ return int(perf_trampoline) == 1
15
-if sys.platform != 'linux':
- raise unittest.SkipTest('Linux only')
-
16
+if not supports_trampoline_profiling():
17
+ raise unittest.SkipTest("perf trampoline profiling not supported")
18
19
class TestPerfMapWriting(unittest.TestCase):
20
def test_write_perf_map_entry(self):
0 commit comments