summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Guittot <vincent.guittot@linaro.org>2020-11-20 18:31:49 +0100
committerVincent Guittot <vincent.guittot@linaro.org>2020-11-26 11:04:03 +0100
commitd184822a7e2cb1813b0b46751e469323c9a3867a (patch)
treeaa13625b87d3d2f04b6e49e01c39eca6f0d33457
parent406aa8db479031a03c773a771e9ea075245e188c (diff)
-rwxr-xr-xautomated/linux/workload-automation3/workload-automation.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/automated/linux/workload-automation3/workload-automation.sh b/automated/linux/workload-automation3/workload-automation.sh
index cdfbe36..9bc1307 100755
--- a/automated/linux/workload-automation3/workload-automation.sh
+++ b/automated/linux/workload-automation3/workload-automation.sh
@@ -49,7 +49,7 @@ export RESULT_FILE
if [ "${SKIP_INSTALL}" = "true" ] || [ "${SKIP_INSTALL}" = "True" ]; then
info_msg "WA installation skipped"
else
- PKGS="git wget zip tar xz-utils python python-yaml python-lxml python-setuptools python-numpy python-colorama python3 python3-pip sqlite3 time sysstat openssh-client openssh-server sshpass python-jinja2 curl"
+ PKGS="git wget zip tar xz-utils python python-yaml python-lxml python-setuptools python-numpy python-colorama python3 python3-pip sqlite3 time sysstat openssh-client openssh-server sshpass python-jinja2 curl iputils-ping"
install_deps "${PKGS}"
# pip3 install pip==8.1.1
pip3 install --upgrade --quiet pip && hash -r
@@ -96,8 +96,18 @@ sed -i 's/^# *PermitRootLogin.*/PermitRootLogin yes/' /etc/ssh/sshd_config
grep "PermitRootLogin yes" /etc/ssh/sshd_config
echo "root:linaro123" | chpasswd
/etc/init.d/ssh restart && sleep 3
-echo $(lava-target-ip) lava-target-ip >> /etc/hosts
-ping -c3 lava-target-ip
+
+if [ -z "$(lava-target-ip)" ]; then
+# No static ip address means usb gadget ethernet
+ lsusb
+ ip a
+ #ip a add 192.168.0.1/255.255.255.0 dev usb0
+ export TARGET_IP="192.168.0.2"
+ echo ${TARGET_IP} lava-target-ip >> /etc/hosts
+else
+ echo $(lava-target-ip) lava-target-ip >> /etc/hosts
+ ping -c3 lava-target-ip
+fi
# Ensure that csv is enabled in result processors.
if ! grep -q 'csv' ./config.yaml; then