Skip to content

Commit

Permalink
Ignore warning about JIT being deactivated when perf support is activ…
Browse files Browse the repository at this point in the history
…e in test_initconfig_api

This is a temporary measure to get JIT tests passing again. This should be reverted once a
more comprehensive fix lands.
  • Loading branch information
mpage committed Nov 1, 2024
1 parent 821759d commit 6b3584a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Lib/test/test_embed.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Run the tests in Programs/_testembed.c (tests for the CPython embedding APIs)
from test import support
from test.libregrtest.utils import get_build_info
from test.support import import_helper, os_helper, threading_helper, MS_WINDOWS
import unittest

Expand Down Expand Up @@ -1780,8 +1781,13 @@ def test_initconfig_api(self):
'perf_profiling': 2,
}
config_dev_mode(preconfig, config)
using_jit = any(x.startswith("JIT") for x in get_build_info())
if using_jit:
stderr = "<sys>:0: RuntimeWarning: JIT deactivated as perf profiling support is active"
else:
stderr = ""
self.check_all_configs("test_initconfig_api", config, preconfig,
api=API_ISOLATED)
api=API_ISOLATED, stderr=stderr)

def test_initconfig_get_api(self):
self.run_embedded_interpreter("test_initconfig_get_api")
Expand Down

0 comments on commit 6b3584a

Please sign in to comment.