Add possibility to use private key for accessing gerrit
Change-Id: I551c6b4baf942e096dc0b8f13bde05be7657b84f
diff --git a/tcp_tests/helpers/utils.py b/tcp_tests/helpers/utils.py
index f2311d4..480a646 100644
--- a/tcp_tests/helpers/utils.py
+++ b/tcp_tests/helpers/utils.py
@@ -356,6 +356,12 @@
return var
+ def basename(path):
+ return os.path.basename(path)
+
+ def dirname(path):
+ return os.path.dirname(path)
+
if options is None:
options = {}
options.update({'os_env': os_env, })
@@ -366,6 +372,9 @@
environment = jinja2.Environment(
loader=jinja2.FileSystemLoader([path, os.path.dirname(path)],
followlinks=True))
+ environment.filters['basename'] = basename
+ environment.filters['dirname'] = dirname
+
template = environment.get_template(filename).render(options)
if required_env_vars and log_env_vars: