From 63e2674d2dc84187980e5286634fcbe172f2b791 Mon Sep 17 00:00:00 2001 From: Douglas RAILLARD Date: Thu, 2 May 2019 16:38:09 +0100 Subject: [PATCH] tools: lisa-test: Use --share '*Target' This will share the same lisa.target.Target for all iterations, if more than one iteration is requested (with -n). That avoids reconnecting to the target at every iteration, which is likely to be the expected behaviour for usual use cases. More advanced users will use exekall directly instead of lisa-test if sharing the Target between iterations is not desired. --- doc/lisa_shell/man/man.rst | 4 +++- doc/man1/lisa.1 | 4 +++- tools/lisa-test | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/lisa_shell/man/man.rst b/doc/lisa_shell/man/man.rst index 4a03975a2..5d79a7b5e 100644 --- a/doc/lisa_shell/man/man.rst +++ b/doc/lisa_shell/man/man.rst @@ -79,7 +79,9 @@ Test commands This is just a wrapper around ``exekall`` that selects all tests modules and use positional arguments as ``--select`` patterns. The default configuration file (``$LISA_CONF``) will be used if available. This can be extended with - user-supplied ``--conf``. + user-supplied ``--conf``. If multiple iterations are requested using ``-n``, + the :class:`lisa.target.Target` instance will be reused across iterations, + to avoid the overhead of setting up the target environment. Usage: ``lisa-test TEST_PATTERN ... [EXEKALL_OPTIONS ...]`` diff --git a/doc/man1/lisa.1 b/doc/man1/lisa.1 index ef6e63957..e304165e4 100644 --- a/doc/man1/lisa.1 +++ b/doc/man1/lisa.1 @@ -133,7 +133,9 @@ _ This is just a wrapper around \fBexekall\fP that selects all tests modules and use positional arguments as \fB\-\-select\fP patterns. The default configuration file (\fB$LISA_CONF\fP) will be used if available. This can be extended with -user\-supplied \fB\-\-conf\fP\&. +user\-supplied \fB\-\-conf\fP\&. If multiple iterations are requested using \fB\-n\fP, +the \fBlisa.target.Target\fP instance will be reused across iterations, +to avoid the overhead of setting up the target environment. .sp Usage: \fBlisa\-test TEST_PATTERN ... [EXEKALL_OPTIONS ...]\fP .sp diff --git a/tools/lisa-test b/tools/lisa-test index 823c1849f..dd5949961 100755 --- a/tools/lisa-test +++ b/tools/lisa-test @@ -29,6 +29,7 @@ cmd=( exekall run "$LISA_HOME/lisa/tests/" \ "${conf_opt[@]}" \ --symlink-artifact-dir-to "$latest_link" \ + --share '*.Target' \ --select-multiple \ "$@" ) -- GitLab