feat(tfut): add support for hooks and run configs
With this patch, the pre_tfut_build hook can be implemented in the
TFUT run config files in order to perform custom actions, such as
setting build targets. This way, build targets can be specified in
the TFUT run config files, as it is currently done for TF-A, allowing
for more flexibility.
Signed-off-by: Juan Pablo Conde <juanpablo.conde@arm.com>
Signed-off-by: Edward Potapov <edward.potapov@arm.com>
Change-Id: If8a4d0c63a885eee9ffdd8f2c5a68c6a3cff9cd4
diff --git a/script/gen_run_config_candidates.py b/script/gen_run_config_candidates.py
index 5a52f99..e6c4e25 100755
--- a/script/gen_run_config_candidates.py
+++ b/script/gen_run_config_candidates.py
@@ -16,6 +16,8 @@
parser = argparse.ArgumentParser(description="Choose run configurations")
parser.add_argument("--print-only", "-p", action="store_true", default=False,
help="Print only; don't check for matching run configs.")
+parser.add_argument("--unit-testing", action="store_true", default=False,
+ help="Use to indicate if it is a unit testing config or not")
parser.add_argument("args", nargs=argparse.REMAINDER, help="Run configuration")
opts = parser.parse_args()
@@ -24,7 +26,10 @@
# Obtain path to run_config directory
script_root = os.path.dirname(os.path.abspath(sys.argv[0]))
-run_config_dir = os.path.join(script_root, os.pardir, "run_config")
+if (not opts.unit_testing):
+ run_config_dir = os.path.join(script_root, os.pardir, "run_config")
+else:
+ run_config_dir = os.path.join(script_root, os.pardir, "run_config_tfut")
arg = opts.args[0]
run_config = arg.split(":")[-1]