mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Skip a couple of tests when running with sanitizer
This commit is contained in:
parent
78b14e7ae2
commit
ccc85bc358
@ -16,6 +16,7 @@ from calibre.constants import iswindows, islinux, ismacos, plugins_loc
|
||||
from polyglot.builtins import iteritems, map, unicode_type, getenv
|
||||
|
||||
is_ci = os.environ.get('CI', '').lower() == 'true'
|
||||
is_sanitized = 'libasan' in os.environ.get('LD_PRELOAD', '')
|
||||
|
||||
|
||||
class BuildTest(unittest.TestCase):
|
||||
@ -286,6 +287,8 @@ class BuildTest(unittest.TestCase):
|
||||
|
||||
@unittest.skipIf('SKIP_QT_BUILD_TEST' in os.environ, 'Skipping Qt build test as it causes crashes in the macOS VM')
|
||||
def test_qt(self):
|
||||
if is_sanitized:
|
||||
raise unittest.SkipTest('Skipping Qt build test as sanitizer is enabled')
|
||||
from qt.core import QTimer
|
||||
from qt.core import QApplication
|
||||
from qt.webengine import QWebEnginePage
|
||||
|
@ -269,10 +269,12 @@ class CScorer(object):
|
||||
|
||||
|
||||
def test(return_tests=False):
|
||||
is_sanitized = 'libasan' in os.environ.get('LD_PRELOAD', '')
|
||||
import unittest
|
||||
|
||||
class Test(unittest.TestCase):
|
||||
|
||||
@unittest.skipIf(is_sanitized, 'Sanitizer enabled will cant check for leaks')
|
||||
def test_mem_leaks(self):
|
||||
import gc
|
||||
from calibre.utils.mem import get_memory as memory
|
||||
|
Loading…
x
Reference in New Issue
Block a user