diff --git a/setup/test.py b/setup/test.py index 6cdf028785..6855681be6 100644 --- a/setup/test.py +++ b/setup/test.py @@ -46,8 +46,6 @@ class Test(Command): sys.libxslt_dylib = ctypes.CDLL(os.path.join(os.environ['SW'], 'lib', 'libxslt.dylib')) sys.libexslt_dylib = ctypes.CDLL(os.path.join(os.environ['SW'], 'lib', 'libexslt.dylib')) print(sys.libxml2_dylib, sys.libxslt_dylib, sys.libexslt_dylib, file=sys.stderr, flush=True) - os.non_calibre_subprocess_env = e = os.environ - del e['DYLD_LIBRARY_PATH'] from calibre.utils.run_tests import ( filter_tests_by_name, remove_tests_by_name, run_cli, find_tests ) diff --git a/setup/unix-ci.py b/setup/unix-ci.py index 733df81c70..5b05c9aebe 100644 --- a/setup/unix-ci.py +++ b/setup/unix-ci.py @@ -161,7 +161,8 @@ username = api if ismacos: os.environ['SSL_CERT_FILE'] = os.path.abspath( 'resources/mozilla-ca-certs.pem') - os.environ['DYLD_LIBRARY_PATH'] = os.path.join(SW, 'lib') # needed to ensure correct libxml2.dylib is loaded + # needed to ensure correct libxml2 is loaded + os.environ['DYLD_INSERT_LIBRARIES'] = ':'.join(os.path.join(SW, 'lib', x) for x in 'libxml2.dylib libxslt.dylib libexslt.dylib'.split()) install_env() run_python('setup.py test') diff --git a/src/calibre/srv/tests/auth.py b/src/calibre/srv/tests/auth.py index e277a34deb..94fd56b8e4 100644 --- a/src/calibre/srv/tests/auth.py +++ b/src/calibre/srv/tests/auth.py @@ -233,7 +233,7 @@ class TestAuth(BaseTest): if curl: def docurl(data, *args): cmd = [curl] + list(args) + ['http://localhost:%d/closed' % server.address[1]] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL, env=getattr(os, 'non_calibre_subprocess_env', os.environ)) + p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.DEVNULL) x = p.stdout.read() p.wait() self.ae(x, data)