Log every finished job to /tmp/testlab.log 88/79688/8
authorAleksander Mistewicz <a.mistewicz@samsung.com>
Fri, 8 Jul 2016 12:52:09 +0000 (14:52 +0200)
committerAleksander Mistewicz <a.mistewicz@samsung.com>
Fri, 7 Oct 2016 15:29:30 +0000 (17:29 +0200)
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 <a.mistewicz@samsung.com>
tsp/common.sh
tsp/scripts/download_image.py
tsp/scripts/log.sh [new file with mode: 0755]

index 5356091..8dd90a1 100755 (executable)
@@ -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"
index f3d7a6a..895ea5c 100755 (executable)
@@ -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 (executable)
index 0000000..bd29684
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo $@ >> /tmp/testlab.log