Commit 0f669068 authored by Petr Špaček's avatar Petr Špaček Committed by Tomas Krizek

Deckard: support execution from another working directory

Paths to templates are now relative so it is possible to execute run.sh
from different directory and use local templates.

*_run.sh (e.g. kresd_run.sh) change to the Deckard top level directory
so they are compatible with previous behavior.
parent c58c107a
......@@ -219,8 +219,8 @@ def setup_daemon_files(prog_cfg, template_ctx, ta_files):
ta_files, prog_cfg['dir'])
# generate configuration files
j2template_loader = jinja2.FileSystemLoader(
searchpath=os.path.dirname(os.path.abspath(__file__)))
j2template_loader = jinja2.FileSystemLoader(searchpath=os.getcwd())
print(os.path.abspath(os.getcwd()))
j2template_env = jinja2.Environment(loader=j2template_loader)
logging.getLogger('deckard.daemon.%s.template' % name).debug(subst)
......
......@@ -8,4 +8,4 @@ source "${MAKEDIR}/env.sh"
# compatibility with old TESTS= env variable
# add --scenarios= only if the variable TESTS is non-empty
python3 -m pytest -c deckard_pytest.ini ${DECKARDFLAGS:-} ${TESTS:+"--scenarios=${TESTS}"} "$@"
python3 -m pytest -c "${MAKEDIR}/deckard_pytest.ini" "${MAKEDIR}" ${DECKARDFLAGS:-} ${TESTS:+"--scenarios=${TESTS}"} "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment