aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Ohly <patrick.ohly@intel.com>2017-01-23 13:26:48 +0100
committerPatrick Ohly <patrick.ohly@intel.com>2017-01-23 13:26:48 +0100
commit03e2c99ec1a2ffeee39344aff109746a2e76449c (patch)
treed53169d94d63b8e766e26be4e2184bf6b8b40b83
parent6c097131ad39d5fb4b3de6f166a7838fa74f5cdc (diff)
downloadmeta-swupd-03e2c99ec1a2ffeee39344aff109746a2e76449c.tar.gz
meta-swupd-03e2c99ec1a2ffeee39344aff109746a2e76449c.tar.bz2
meta-swupd-03e2c99ec1a2ffeee39344aff109746a2e76449c.zip
swupd-image.bbclass: avoid depending on time command
The time command's output is merely informational and less relevant now that performance is better than it used to be. Calling it unconditional is problematic because some build hosts might not have it. By default the command is no longer used, but can still be enabled locally by setting SWUPD_TIMING_CMD = "time" in local.conf or site.conf. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
-rw-r--r--classes/swupd-image.bbclass8
1 files changed, 7 insertions, 1 deletions
diff --git a/classes/swupd-image.bbclass b/classes/swupd-image.bbclass
index 78a26ac..771a416 100644
--- a/classes/swupd-image.bbclass
+++ b/classes/swupd-image.bbclass
@@ -338,6 +338,12 @@ python do_fetch_swupd_inputs () {
do_fetch_swupd_inputs[dirs] = "${SWUPDIMAGEDIR}"
addtask do_fetch_swupd_inputs before do_swupd_update
+# Change this to SWUPD_TIMING_CMD = "time" in local.conf
+# to enable timing the individual swupd server command invocations.
+# Relies on a build host which has "time" as a shell or system
+# command.
+SWUPD_TIMING_CMD ?= ""
+
# do_swupd_update uses its own pseudo database, for several reasons:
# - Performance is better when the pseudo instance is not shared
# with other tasks that run in parallel (for example, meta-isafw's do_analyse_image).
@@ -504,7 +510,7 @@ END
invoke_swupd () {
echo $PSEUDO "$@"
- time env $PSEUDO "$@"
+ ${SWUPD_TIMING_CMD} env $PSEUDO "$@"
}
waitall () {