From 793f97c8416e4abdc42eec8ef3e0253ca5c5279e Mon Sep 17 00:00:00 2001 From: Aleksander Mistewicz Date: Fri, 8 Jul 2016 14:52:09 +0200 Subject: Log every finished job to /tmp/testlab.log Add quiet param to wget in tsp/scripts/download_image.py Add tsp/scripts/log.sh which writes all its params to /tmp/testlab.log Add env variable in tsp/common.sh: TS_ONFINISH if TSP_DIR is set Change-Id: I87510f3fe73dc20d1842075cdf77186b8d298581 Signed-off-by: Aleksander Mistewicz --- tsp/common.sh | 1 + tsp/scripts/download_image.py | 2 +- tsp/scripts/log.sh | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100755 tsp/scripts/log.sh (limited to 'tsp') diff --git a/tsp/common.sh b/tsp/common.sh index 5356091..8dd90a1 100755 --- a/tsp/common.sh +++ b/tsp/common.sh @@ -27,6 +27,7 @@ die() { exit ${2:-1} } +test -z "${TSP_DIR}" || export TS_ONFINISH="${TSP_DIR}/scripts/log.sh" WS="${HOME}/ws" WS_WATCHER="${WS}/watcher" diff --git a/tsp/scripts/download_image.py b/tsp/scripts/download_image.py index f3d7a6a..895ea5c 100755 --- a/tsp/scripts/download_image.py +++ b/tsp/scripts/download_image.py @@ -197,7 +197,7 @@ class ImageDownloader: def get(self, urls, md5sum): while True: - subprocess.call(["wget", "-c"] + urls) + subprocess.call(["wget", "-cq"] + urls) if not self.check_md5(md5sum): break time.sleep(60) diff --git a/tsp/scripts/log.sh b/tsp/scripts/log.sh new file mode 100755 index 0000000..bd29684 --- /dev/null +++ b/tsp/scripts/log.sh @@ -0,0 +1,2 @@ +#!/bin/sh +echo $@ >> /tmp/testlab.log -- cgit v1.2.3