mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Cleaner rexec logic
This commit is contained in:
parent
47bf99c214
commit
573693a052
@ -181,9 +181,10 @@ class Test(Command):
|
|||||||
help='Run the test suite with the sanitizer preloaded')
|
help='Run the test suite with the sanitizer preloaded')
|
||||||
|
|
||||||
def run(self, opts):
|
def run(self, opts):
|
||||||
if opts.under_sanitize:
|
if opts.under_sanitize and 'CALIBRE_EXECED_UNDER_SANITIZE' not in os.environ:
|
||||||
if 'libasan' not in os.environ.get('LD_PRELOAD', ''):
|
if 'libasan' not in os.environ.get('LD_PRELOAD', ''):
|
||||||
os.environ['LD_PRELOAD'] = os.path.abspath(subprocess.check_output('gcc -print-file-name=libasan.so'.split()).decode('utf-8').strip())
|
os.environ['LD_PRELOAD'] = os.path.abspath(subprocess.check_output('gcc -print-file-name=libasan.so'.split()).decode('utf-8').strip())
|
||||||
|
os.environ['CALIBRE_EXECED_UNDER_SANITIZE'] = '1'
|
||||||
os.environ['ASAN_OPTIONS'] = 'detect_leaks=0'
|
os.environ['ASAN_OPTIONS'] = 'detect_leaks=0'
|
||||||
os.environ['PYCRYPTODOME_DISABLE_DEEPBIND'] = '1' # https://github.com/Legrandin/pycryptodome/issues/558
|
os.environ['PYCRYPTODOME_DISABLE_DEEPBIND'] = '1' # https://github.com/Legrandin/pycryptodome/issues/558
|
||||||
self.info(f'Re-execing with LD_PRELOAD={os.environ["LD_PRELOAD"]}')
|
self.info(f'Re-execing with LD_PRELOAD={os.environ["LD_PRELOAD"]}')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user