summaryrefslogtreecommitdiff
path: root/test/script_loader.py
diff options
context:
space:
mode:
authorWojtek Kosior <koszko@koszko.org>2022-01-03 20:43:44 +0100
committerWojtek Kosior <koszko@koszko.org>2022-01-03 20:43:44 +0100
commit3840192d67a38604cfd6738c4f07d181a668ae68 (patch)
tree9924aa3ae6bab87abbf531891430ee07c2587c5f /test/script_loader.py
parentc71ebff86fa79b20388749dd4781fd96fcc5c63a (diff)
downloadbrowser-extension-3840192d67a38604cfd6738c4f07d181a668ae68.tar.gz
browser-extension-3840192d67a38604cfd6738c4f07d181a668ae68.zip
facilitate testing extension's HTML files
Diffstat (limited to 'test/script_loader.py')
-rw-r--r--test/script_loader.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/test/script_loader.py b/test/script_loader.py
index f527d9e..07f75c7 100644
--- a/test/script_loader.py
+++ b/test/script_loader.py
@@ -30,9 +30,6 @@ import subprocess, re
from .misc_constants import *
-script_root = here.parent
-awk_script = script_root / 'compute_scripts.awk'
-
def make_relative_path(path):
path = Path(path)
@@ -65,9 +62,8 @@ def load_script(path, code_to_add=None):
append_flags = () if code_to_add is None else ('-A', ':'.join(key))
- awk = subprocess.run(['awk', '-f', str(awk_script), '--', '-D', 'MOZILLA',
- '-D', 'MV2', '-D', 'TEST', '-D', 'UNIT_TEST',
- '-D', 'DEBUG', *append_flags,
+ awk = subprocess.run(['awk', '-f', awk_script_name, '--',
+ *unit_test_defines, *append_flags,
'--output=amalgamate-js:' + str(path)],
stdout=subprocess.PIPE, cwd=script_root, check=True)
script = awk.stdout.decode()