From 973b2217dd3b79189ef6de2b7cba509292fa4565 Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Fri, 22 Oct 2021 12:16:42 +0200 Subject: [PATCH] framework: allow to use env variables in args such as OUTPUT_DIR for datasets --- run.py | 2 ++ tests/datasets-pcrexform/test.yaml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/run.py b/run.py index 3b7ae08cc..a6739b089 100755 --- a/run.py +++ b/run.py @@ -625,6 +625,8 @@ class TestRunner: template = string.Template(args) cmdline = template.substitute(env) else: + for a in range(len(args)): + args[a] = string.Template(args[a]).substitute(env) cmdline = " ".join(args) + "\n" open(os.path.join(self.output, "cmdline"), "w").write(cmdline) diff --git a/tests/datasets-pcrexform/test.yaml b/tests/datasets-pcrexform/test.yaml index 5e4560f13..28966a641 100644 --- a/tests/datasets-pcrexform/test.yaml +++ b/tests/datasets-pcrexform/test.yaml @@ -6,7 +6,7 @@ requires: - src/datasets.c args: - - -k none --data-dir=output + - -k none --data-dir=${OUTPUT_DIR} checks: - file-compare: -- 2.47.2