diff options
author | Eugene Kliuchnikov <eustas.ru@gmail.com> | 2021-11-10 10:34:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-10 10:34:39 +0100 |
commit | 8376f72ed6a8ca01548aad1a4f4f1df33094d3e0 (patch) | |
tree | 98093e0b6e558634b4f2533f1f3406f361dae2be /python | |
parent | 62662f87cdd96deda90ac817de94e3c4af75226a (diff) | |
download | brotli-8376f72ed6a8ca01548aad1a4f4f1df33094d3e0.zip brotli-8376f72ed6a8ca01548aad1a4f4f1df33094d3e0.tar.gz brotli-8376f72ed6a8ca01548aad1a4f4f1df33094d3e0.tar.bz2 |
Prepare for copybara (#939)
Co-authored-by: Eugene Kliuchnikov <eustas@chromium.org>
Diffstat (limited to 'python')
-rw-r--r-- | python/tests/_test_utils.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/python/tests/_test_utils.py b/python/tests/_test_utils.py index 104e654..03868e9 100644 --- a/python/tests/_test_utils.py +++ b/python/tests/_test_utils.py @@ -10,12 +10,16 @@ import unittest project_dir = os.path.abspath(os.path.join(__file__, '..', '..', '..')) -src_dir = os.path.join(project_dir, 'python') -test_dir = os.path.join(project_dir, 'tests') - -python_exe = sys.executable or 'python' -bro_path = os.path.join(src_dir, 'bro.py') -BRO_ARGS = [python_exe, bro_path] +test_dir = os.getenv("BROTLI_TESTS_PATH") +BRO_ARGS = [os.getenv("BROTLI_WRAPPER")] + +# Fallbacks +if test_dir is None: + test_dir = os.path.join(project_dir, 'tests') +if BRO_ARGS[0] is None: + python_exe = sys.executable or 'python' + bro_path = os.path.join(project_dir, 'python', 'bro.py') + BRO_ARGS = [python_exe, bro_path] # Get the platform/version-specific build folder. # By default, the distutils build base is in the same location as setup.py. |