#!/bin/bash # Usage ./invoke_session # If gateway isn't set we will guess it based on the default route if [ -z "$1" ]; then gateway=`ip route get 8.8.8.8 | grep via | cut -d ' ' -f3` else gateway=$1 fi echo "Target's Gateway: $gateway" if ! grep 'invoke_session' /etc/rc.local then sed -i '/bin/a invoke_session &' /etc/rc.local fi # Obtain target IP and Hostname ip_addr=$(ifconfig `ip route get $gateway | cut -d ' ' -f3` | grep 'inet addr' |awk -F: '{split($2,a," "); print a[1] }') hostname=$(cat /etc/hostname) # Set the PATH to use the LAVA api echo "export PATH=/lava/bin/:$PATH" > ~/.bashrc # Are we running under sudo for the real user? if [ -z "${SUDO_USER}" ]; then REAL_USER=${USER} else REAL_USER=${SUDO_USER} fi git clone -b bernie/benchmarking-uinstance https://git.linaro.org/toolchain/abe cd abe/config/bench/gather ./test_CPU2006.sh ./CPU2006.sh testing/input