summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Hilman <khilman@baylibre.com>2020-04-28 13:16:25 -0700
committerGitHub <noreply@github.com>2020-04-28 13:16:25 -0700
commit9596a7d56f8e4b6653ae1735075b3fc95b268fe9 (patch)
treede984a68d4cb6eaa0f91aedf68b7a2fe4ba5330f
parent8510b8144b8ca5a17ce956ee447fed4cd1c95e7b (diff)
parent45ef46bfd2fdc5581541b0225fafb4b181da379c (diff)
Merge pull request #116 from montjoie/misc-04-2020
Misc 04 2020
-rwxr-xr-xlava-slave/scripts/setup.sh6
-rwxr-xr-xlavalab-gen.py2
2 files changed, 5 insertions, 3 deletions
diff --git a/lava-slave/scripts/setup.sh b/lava-slave/scripts/setup.sh
index c39fdc4..58672c3 100755
--- a/lava-slave/scripts/setup.sh
+++ b/lava-slave/scripts/setup.sh
@@ -22,7 +22,7 @@ echo "Dynamic slave for $LAVA_MASTER ($LAVA_MASTER_URI)"
LAVACLIOPTS="--uri $LAVA_MASTER_URI"
# do a sort of ping for letting master to be up
-TIMEOUT=300
+TIMEOUT=1200
while [ $TIMEOUT -ge 1 ];
do
STEP=2
@@ -30,7 +30,7 @@ do
if [ $? -eq 0 ];then
TIMEOUT=0
else
- echo "Wait for master...."
+ echo "Wait for master.... (${TIMEOUT}s remains)"
sleep $STEP
fi
TIMEOUT=$(($TIMEOUT-$STEP))
@@ -50,10 +50,12 @@ fi
lavacli $LAVACLIOPTS device-types list > /tmp/device-types.list
if [ $? -ne 0 ];then
+ echo "ERROR: fail to list device-types"
exit 1
fi
lavacli $LAVACLIOPTS devices list -a > /tmp/devices.list
if [ $? -ne 0 ];then
+ echo "ERROR: fail to list devices"
exit 1
fi
for worker in $(ls /root/devices/)
diff --git a/lavalab-gen.py b/lavalab-gen.py
index ea4417d..96d25c1 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
#
from __future__ import print_function
import os, sys, time