summaryrefslogtreecommitdiffstatshomepage
path: root/regtests/tool_tester/tool_tester/_selfexe.py
diff options
context:
space:
mode:
author angelosa <lordkale4@gmail.com>2021-02-15 00:10:31 +0100
committer angelosa <lordkale4@gmail.com>2021-02-15 00:10:31 +0100
commite9906b995b34d5d30d98f4dadd8edb093e762d05 (patch)
tree3b033c2ad94568981cae1927d7ebf0be37fe05eb /regtests/tool_tester/tool_tester/_selfexe.py
parentb8d21c8ea30d410d1a8c4796298c306837c6f55e (diff)
tool_tester: add optional arguments (single shot, verbose log output, work directory)
Diffstat (limited to 'regtests/tool_tester/tool_tester/_selfexe.py')
-rw-r--r--regtests/tool_tester/tool_tester/_selfexe.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/regtests/tool_tester/tool_tester/_selfexe.py b/regtests/tool_tester/tool_tester/_selfexe.py
index 28f9c660616..7a42ecaa3d5 100644
--- a/regtests/tool_tester/tool_tester/_selfexe.py
+++ b/regtests/tool_tester/tool_tester/_selfexe.py
@@ -9,11 +9,13 @@ import subprocess
from typing import Dict, List
class SelfExeTests(ABC):
- def __init__(self, id_exe: str, assets_folder: str):
- self.identifier = id_exe
- self._exec_path = os.path.join(os.getcwd(), "{0}{1}".format(id_exe, ".exe" if os.name == 'nt' else ""))
- self._assets_path = assets_folder
- logging.debug("Setup %s executable exe at %s", id_exe, self._exec_path)
+ identifier: str
+
+ def __init__(self, work_path: str, assets_path: str):
+ __id_exe = self.identifier
+ self._exec_path = os.path.join(work_path, "{0}{1}".format(__id_exe, ".exe" if os.name == 'nt' else ""))
+ self._assets_path = assets_path
+ logging.debug("Setup %s executable exe at %s", __id_exe, self._exec_path)
def compose_tests(self) -> Dict:
"""Compose a list of tests to be later reused.