aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xprepare-config.py27
-rwxr-xr-xprepare-device.sh215
-rwxr-xr-xrun-workload.sh14
-rwxr-xr-xtear-down.sh10
-rwxr-xr-xtemplates/config-juno.py (renamed from templates/config.py)2
-rwxr-xr-xtemplates/config-nexus9.py28
-rwxr-xr-xtemplates/config-tc2.py26
-rw-r--r--templates/nexus9_andebench.yaml12
-rw-r--r--templates/nexus9_benchmarkpi.yaml11
-rw-r--r--templates/nexus9_caffeinemark.yaml11
-rw-r--r--templates/nexus9_deltablue.yaml11
-rw-r--r--templates/nexus9_linpack.yaml11
-rw-r--r--templates/nexus9_quadrant.yaml11
-rw-r--r--templates/nexus9_scimark2.yaml11
-rw-r--r--templates/nexus9_ubench.yaml11
-rw-r--r--wa2host.yaml6
-rw-r--r--wa2target.yaml38
17 files changed, 286 insertions, 169 deletions
diff --git a/prepare-config.py b/prepare-config.py
index 397c7f5..66d6ad4 100755
--- a/prepare-config.py
+++ b/prepare-config.py
@@ -21,23 +21,33 @@
# Author: Milosz Wasilewski <milosz.wasilewski@linaro.org>
#
+import os
import re
import sys
from string import Template
from optparse import OptionParser
TEMPLATE_PATH = "templates/"
+CONFIG_PATH = TEMPLATE_PATH
CONFIG_NAME = "config.py"
-CONFIG_PATH = TEMPLATE_PATH + CONFIG_NAME
LAVA_CACHE_PATH = "/tmp/lava_multi_node_cache.txt"
IPADDR_FILE = "IPADDR"
IPADDR = "-ipaddr"
+def isgoodipv4(s):
+ pieces = s.split('.')
+ if len(pieces) != 4: return False
+ try: return all(0<=int(p)<256 for p in pieces)
+ except ValueError: return False
+
if __name__ == '__main__':
usage = "usage: %prog [OPTIONS]"
parser = OptionParser(usage=usage)
parser.add_option("-p", "--prefix", dest="prefix",
help="Signal prefix used in the multinode job to retrieve IP address")
+ parser.add_option("-c", "--config", dest="config",
+ help="Name of config.py template. Default is config.py",
+ default="config.py")
(options, args) = parser.parse_args()
if not options.prefix:
@@ -52,15 +62,20 @@ if __name__ == '__main__':
if lava_cache_match:
if lava_cache_match.group("key") == options.prefix + IPADDR:
ipaddr = lava_cache_match.group("value")
- ipaddr_file = open(IPADDR_FILE, "w")
- ipaddr_file.write(ipaddr)
- ipaddr_file.close()
+ if ipaddr == "_MISSING_":
+ ipaddr = None
+ else:
+ with open(IPADDR_FILE, "w") as ipaddr_file:
+ ipaddr_file.write(ipaddr)
lava_cache_file.close()
if not ipaddr:
sys.exit(1)
- config = open(CONFIG_PATH, "r")
+ config = open(os.path.join(CONFIG_PATH, options.config), "r")
config_template = Template(config.read())
config.close()
dest_config = open(CONFIG_NAME, "w")
- dest_config.write(config_template.safe_substitute(ipaddr=ipaddr + ":5555"))
+ if isgoodipv4(ipaddr):
+ dest_config.write(config_template.safe_substitute(ipaddr=ipaddr + ":5555"))
+ else:
+ dest_config.write(config_template.safe_substitute(ipaddr=ipaddr))
dest_config.close()
diff --git a/prepare-device.sh b/prepare-device.sh
index b56b688..2153b9e 100755
--- a/prepare-device.sh
+++ b/prepare-device.sh
@@ -22,238 +22,165 @@
# Author: Naresh Kamboju <naresh.kamboju@linaro.org>
#
-set -e
+#set -e
echo "Preparing device for mode: $1"
disable_iks () {
IPADDR=`cat IPADDR`
echo "Disable IKS for $IPADDR"
- echo "adb -s $IPADDR:5555 shell \"echo 0 > /sys/kernel/bL_switcher/active\""
- adb -s $IPADDR:5555 shell "echo 0 > /sys/kernel/bL_switcher/active"
- adb -s $IPADDR:5555 shell "cat /sys/kernel/bL_switcher/active"
+ echo "adb -s $IPADDR shell \"echo 0 > /sys/kernel/bL_switcher/active\""
+ adb -s $IPADDR shell "echo 0 > /sys/kernel/bL_switcher/active"
+ adb -s $IPADDR shell "cat /sys/kernel/bL_switcher/active"
}
+adb_connect_device () {
+ expr "$1" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$'
+ if [ $? -eq 0 ]; then adb connect $1; IPADDR=$1:5555; fi
+}
+
+IPADDR=`cat IPADDR`
+adb_connect_device $IPADDR
+echo $IPADDR
+adb devices
+adb wait-for-device
+
if [ $1 == 'iks' ]
then
# enable IKS
- IPADDR=`cat IPADDR`
echo "Enable IKS for $IPADDR"
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
- echo "adb -s $IPADDR:5555 shell \"echo 1 > /sys/kernel/bL_switcher/active\""
- adb -s $IPADDR:5555 shell "echo 1 > /sys/kernel/bL_switcher/active"
- adb -s $IPADDR:5555 shell "cat /sys/kernel/bL_switcher/active"
+ echo "adb -s $IPADDR shell \"echo 1 > /sys/kernel/bL_switcher/active\""
+ adb -s $IPADDR shell "echo 1 > /sys/kernel/bL_switcher/active"
+ adb -s $IPADDR shell "cat /sys/kernel/bL_switcher/active"
fi
if [ $1 == 'a7only' ]
then
- IPADDR=`cat IPADDR`
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
echo "Disable A15 cluster"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu1/online"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu2/online"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu1/online"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu2/online"
fi
if [ $1 == 'a15only' ]
then
- IPADDR=`cat IPADDR`
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
echo "Disable A7 cluster"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu0/online"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu3/online"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu4/online"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu0/online"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu3/online"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu4/online"
fi
if [ $1 == 'a53only' ]
then
- IPADDR=`cat IPADDR`
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
- adb devices
echo "Disable A57 cluster"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu1/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu2/online | su"
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu1/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu2/online | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
fi
if [ $1 == 'a57only' ]
then
- IPADDR=`cat IPADDR`
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
- adb devices
echo "Disable A53 cluster"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu0/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu3/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu4/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu5/online | su"
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu0/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu3/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu4/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu5/online | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
fi
if [ $1 == 'hmp' ]
then
- IPADDR=`cat IPADDR`
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
- adb devices
if [ $2 == 'vexpress-tc2' ]
then
disable_iks
fi
if [ $2 == 'juno' ]
then
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
fi
- adb connect $IPADDR:5555
- adb wait-for-device
- adb devices
fi
if [ $1 == 'easON_a53bc' ]
then
- IPADDR=`cat IPADDR`
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
if [ $2 == 'juno' ]
then
- adb -s $IPADDR:5555 shell "echo ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
fi
- adb connect $IPADDR:5555
- adb wait-for-device
- adb devices
fi
if [ $1 == 'easOFF_a53bc' ]
then
- IPADDR=`cat IPADDR`
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
if [ $2 == 'juno' ]
then
- adb -s $IPADDR:5555 shell "echo NO_ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo NO_ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
fi
- adb connect $IPADDR:5555
- adb wait-for-device
- adb devices
fi
if [ $1 == 'easON_a53only' ]
then
- IPADDR=`cat IPADDR`
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
if [ $2 == 'juno' ]
then
- adb -s $IPADDR:5555 shell "echo ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
+ adb -s $IPADDR shell "echo ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
echo "Disable A57 cluster"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu1/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu2/online | su"
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu1/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu2/online | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
fi
- adb connect $IPADDR:5555
- adb wait-for-device
- adb devices
fi
if [ $1 == 'easOFF_a53only' ]
then
- IPADDR=`cat IPADDR`
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
if [ $2 == 'juno' ]
then
- adb -s $IPADDR:5555 shell "echo NO_ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
+ adb -s $IPADDR shell "echo NO_ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
echo "Disable A57 cluster"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu1/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu2/online | su"
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu1/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu2/online | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 700000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq | su"
fi
- adb connect $IPADDR:5555
- adb wait-for-device
- adb devices
fi
if [ $1 == 'easON_a57only' ]
then
- IPADDR=`cat IPADDR`
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
if [ $2 == 'juno' ]
then
- adb -s $IPADDR:5555 shell "echo ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
+ adb -s $IPADDR shell "echo ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
echo "Disable A53 cluster"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu0/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu3/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu4/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu5/online | su"
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu0/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu3/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu4/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu5/online | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
fi
- adb connect $IPADDR:5555
- adb wait-for-device
- adb devices
fi
if [ $1 == 'easOFF_a57only' ]
then
- IPADDR=`cat IPADDR`
- adb connect $IPADDR:5555
- adb devices
- echo "Waiting for device"
- adb wait-for-device
if [ $2 == 'juno' ]
then
- adb -s $IPADDR:5555 shell "echo NO_ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
+ adb -s $IPADDR shell "echo NO_ENERGY_AWARE > /sys/kernel/debug/sched_features | su"
echo "Disable A53 cluster"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu0/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu3/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu4/online | su"
- adb -s $IPADDR:5555 shell "echo 0 > /sys/devices/system/cpu/cpu5/online | su"
- adb -s $IPADDR:5555 shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
- adb -s $IPADDR:5555 shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu0/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu3/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu4/online | su"
+ adb -s $IPADDR shell "echo 0 > /sys/devices/system/cpu/cpu5/online | su"
+ adb -s $IPADDR shell "echo 85 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/go_hispeed_load | su"
+ adb -s $IPADDR shell "echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/interactive/hispeed_freq | su"
fi
- adb connect $IPADDR:5555
- adb wait-for-device
- adb devices
fi
exit 0
diff --git a/run-workload.sh b/run-workload.sh
index 9cc099e..3e549e5 100755
--- a/run-workload.sh
+++ b/run-workload.sh
@@ -36,17 +36,21 @@ echo -e "**********************\n"
echo -e "CPU status"
echo -e "**********************\n"
IPADDR=`cat IPADDR`
-adb -s $IPADDR:5555 shell "cat /proc/cpuinfo"
+expr "$IPADDR" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$'
+if [ $? -eq 0 ]; then adb connect $IPADDR; IPADDR=$IPADDR; fi
+adb -s $IPADDR shell "cat /proc/cpuinfo"
echo -n "online: "
-adb -s $IPADDR:5555 shell "cat /sys/devices/system/cpu/online"
+adb -s $IPADDR shell "cat /sys/devices/system/cpu/online"
echo -n "offline: "
-adb -s $IPADDR:5555 shell "cat /sys/devices/system/cpu/offline"
+adb -s $IPADDR shell "cat /sys/devices/system/cpu/offline"
echo -n "possible: "
-adb -s $IPADDR:5555 shell "cat /sys/devices/system/cpu/possible"
+adb -s $IPADDR shell "cat /sys/devices/system/cpu/possible"
echo -n "IKS enabled: "
-adb -s $IPADDR:5555 shell "cat /sys/kernel/bL_switcher/active"
+adb -s $IPADDR shell "cat /sys/kernel/bL_switcher/active"
echo -e "**********************\n"
echo "wa run $1 -v -f -d $2 -c config.py"
+# make sure /usr/local/bin is included in the path
+export PATH=$PATH:/usr/local/bin
wa run $1 -v -f -d $2 -c config.py
exit 0
diff --git a/tear-down.sh b/tear-down.sh
index ad529e8..3211aea 100755
--- a/tear-down.sh
+++ b/tear-down.sh
@@ -2,6 +2,10 @@
IPADDR=`cat IPADDR`
adb devices
-echo "Disconnecting adb from $IPADDR:5555"
-adb disconnect $IPADDR:5555
-adb devices
+expr "$IPADDR" : '[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$'
+if [ $? -eq 0 ]
+then
+ echo "Disconnecting adb from $IPADDR:5555"
+ adb disconnect $IPADDR:5555
+ adb devices
+fi
diff --git a/templates/config.py b/templates/config-juno.py
index 43f18df..1d5721f 100755
--- a/templates/config.py
+++ b/templates/config-juno.py
@@ -22,5 +22,5 @@ logging = {
}
device_config = dict(
- adb_name="$ipaddr"
+ adb_name="$ipaddr",
)
diff --git a/templates/config-nexus9.py b/templates/config-nexus9.py
new file mode 100755
index 0000000..eacf2d4
--- /dev/null
+++ b/templates/config-nexus9.py
@@ -0,0 +1,28 @@
+reboot_policy = 'never'
+instrumentation = [
+ 'execution_time',
+ #'daq',
+ 'interrupts',
+ 'cpufreq',
+ #'hwmon',
+ #'perf',
+ #'streamline',
+]
+
+result_processors = [
+ 'standard',
+ 'csv',
+ 'json',
+ 'sqlite'
+]
+
+logging = {
+ 'file format': '%(asctime)s %(levelname)-8s %(name)s: %(message)s',
+ 'verbose format': '%(asctime)s %(levelname)-8s %(name)s: %(message)s',
+}
+
+device_config = dict(
+ adb_name="$ipaddr",
+ binaries_directory='/data/local/tmp',
+ working_directory='/storage/sdcard0',
+)
diff --git a/templates/config-tc2.py b/templates/config-tc2.py
new file mode 100755
index 0000000..1d5721f
--- /dev/null
+++ b/templates/config-tc2.py
@@ -0,0 +1,26 @@
+reboot_policy = 'never'
+instrumentation = [
+ 'execution_time',
+ #'daq',
+ #'interrupts',
+ #'cpufreq',
+ 'hwmon',
+ #'perf',
+ #'streamline',
+]
+
+result_processors = [
+ 'standard',
+ 'csv',
+ 'json',
+ 'sqlite'
+]
+
+logging = {
+ 'file format': '%(asctime)s %(levelname)-8s %(name)s: %(message)s',
+ 'verbose format': '%(asctime)s %(levelname)-8s %(name)s: %(message)s',
+}
+
+device_config = dict(
+ adb_name="$ipaddr",
+)
diff --git a/templates/nexus9_andebench.yaml b/templates/nexus9_andebench.yaml
new file mode 100644
index 0000000..4c7a218
--- /dev/null
+++ b/templates/nexus9_andebench.yaml
@@ -0,0 +1,12 @@
+config:
+ device: Nexus10
+ run_name: ART_benchmarking
+global:
+ iterations: 13
+workloads:
+ - name: homescreen
+ params:
+ duration: 2
+ - id: andebench
+ name: andebench
+ number_of_threads: 1
diff --git a/templates/nexus9_benchmarkpi.yaml b/templates/nexus9_benchmarkpi.yaml
new file mode 100644
index 0000000..90d1e6b
--- /dev/null
+++ b/templates/nexus9_benchmarkpi.yaml
@@ -0,0 +1,11 @@
+config:
+ device: Nexus10
+ run_name: ART_benchmarking
+global:
+ iterations: 13
+workloads:
+ - name: homescreen
+ params:
+ duration: 2
+ - id: benchmarkpi
+ name: benchmarkpi
diff --git a/templates/nexus9_caffeinemark.yaml b/templates/nexus9_caffeinemark.yaml
new file mode 100644
index 0000000..7fea06c
--- /dev/null
+++ b/templates/nexus9_caffeinemark.yaml
@@ -0,0 +1,11 @@
+config:
+ device: Nexus10
+ run_name: ART_benchmarking
+global:
+ iterations: 13
+workloads:
+ - name: homescreen
+ params:
+ duration: 2
+ - id: caffeinemark
+ name: caffeinemark
diff --git a/templates/nexus9_deltablue.yaml b/templates/nexus9_deltablue.yaml
new file mode 100644
index 0000000..68e26bb
--- /dev/null
+++ b/templates/nexus9_deltablue.yaml
@@ -0,0 +1,11 @@
+config:
+ device: Nexus10
+ run_name: ART_benchmarking
+global:
+ iterations: 13
+workloads:
+ - name: homescreen
+ params:
+ duration: 2
+ - id: deltablue
+ name: deltablue
diff --git a/templates/nexus9_linpack.yaml b/templates/nexus9_linpack.yaml
new file mode 100644
index 0000000..2dde072
--- /dev/null
+++ b/templates/nexus9_linpack.yaml
@@ -0,0 +1,11 @@
+config:
+ device: Nexus10
+ run_name: ART_benchmarking
+global:
+ iterations: 13
+workloads:
+ - name: homescreen
+ params:
+ duration: 2
+ - id: linpack
+ name: linpack
diff --git a/templates/nexus9_quadrant.yaml b/templates/nexus9_quadrant.yaml
new file mode 100644
index 0000000..d3bacad
--- /dev/null
+++ b/templates/nexus9_quadrant.yaml
@@ -0,0 +1,11 @@
+config:
+ device: Nexus10
+ run_name: ART_benchmarking
+global:
+ iterations: 13
+workloads:
+ - name: homescreen
+ params:
+ duration: 2
+ - id: quadrant
+ name: quadrant
diff --git a/templates/nexus9_scimark2.yaml b/templates/nexus9_scimark2.yaml
new file mode 100644
index 0000000..39a5835
--- /dev/null
+++ b/templates/nexus9_scimark2.yaml
@@ -0,0 +1,11 @@
+config:
+ device: Nexus10
+ run_name: ART_benchmarking
+global:
+ iterations: 13
+workloads:
+ - name: homescreen
+ params:
+ duration: 2
+ - id: scimark2
+ name: scimark2
diff --git a/templates/nexus9_ubench.yaml b/templates/nexus9_ubench.yaml
new file mode 100644
index 0000000..d3a70b1
--- /dev/null
+++ b/templates/nexus9_ubench.yaml
@@ -0,0 +1,11 @@
+config:
+ device: Nexus10
+ run_name: ART_benchmarking
+global:
+ iterations: 13
+workloads:
+ - name: homescreen
+ params:
+ duration: 2
+ - id: ubench
+ name: ubench
diff --git a/wa2host.yaml b/wa2host.yaml
index ed739cd..ccf5d7c 100644
--- a/wa2host.yaml
+++ b/wa2host.yaml
@@ -16,6 +16,8 @@ params:
JOB_NAME: "workload-automation"
MODE: "hmp"
DEVICE: ""
+ # name of the template for device config
+ CONFIG: "config-juno.py"
SIGNAL_PREFIX: "workload"
# TODO: build-tools.tar.gz only accessible from Linaro LAVA lab
# TODO: Provide a valid build-tools URL from Json
@@ -49,9 +51,11 @@ install:
run:
steps:
+ - pwd
+ - ls
- lava-test-case step1-$SIGNAL_PREFIX-prepare-agenda --shell ./prepare-agenda.py --agenda $AGENDA --job-name $JOB_NAME
- lava-test-case step2-$SIGNAL_PREFIX-wait-for-ip --shell lava-wait $SIGNAL_PREFIX-send-ip
- - lava-test-case step3-$SIGNAL_PREFIX-prepare-config --shell ./prepare-config.py --prefix $SIGNAL_PREFIX
+ - lava-test-case step3-$SIGNAL_PREFIX-prepare-config --shell ./prepare-config.py --prefix $SIGNAL_PREFIX --config $CONFIG
- lava-test-case step4-$SIGNAL_PREFIX-prepare-device --shell ./prepare-device.sh $MODE $DEVICE
- lava-test-case step5-$SIGNAL_PREFIX-run-workload --shell ./run-workload.sh $AGENDA $JOB_NAME
- if [ -f ./$JOB_NAME/results.csv ]; then lava-test-case-attach step6-$SIGNAL_PREFIX-run-workload ./$JOB_NAME/results.csv; fi
diff --git a/wa2target.yaml b/wa2target.yaml
index 4a63fef..4f85bc7 100644
--- a/wa2target.yaml
+++ b/wa2target.yaml
@@ -5,25 +5,45 @@ metadata:
maintainer:
- milosz.wasilewski@linaro.org
os:
- - ubuntu
+ - android
scope:
- functional
+ - performance
devices:
- vexpress-tc2
- juno
+ - mn-nexus9
params:
SIGNAL_PREFIX: "workload"
+ # ADB_LINK parameter is used to pass proper device
+ # identification to the host side. Default is ETH
+ # which means adb-over-ethernet is used
+ ADB_LINK: "ETH"
run:
steps:
- 'mount -o rw,remount /'
- - lava-test-case step1-$SIGNAL_PREFIX-cat-build-info --shell cat /system/build.prop
- - lava-test-case step2-$SIGNAL_PREFIX-get-adb --shell getprop service.adb.tcp.port
- - lava-test-case step3-$SIGNAL_PREFIX-set-adb --shell setprop service.adb.tcp.port 5555
- - lava-test-case step4-$SIGNAL_PREFIX-set-adbd --shell setprop service.adb.root 1
- - lava-test-case step5-$SIGNAL_PREFIX-stop-adbd --shell stop adbd
- - lava-test-case step6-$SIGNAL_PREFIX-start-adbd --shell start adbd
- - lava-test-case step7-$SIGNAL_PREFIX-send-ip --shell lava-send $SIGNAL_PREFIX-send-ip $SIGNAL_PREFIX-ipaddr=$(getprop dhcp.eth0.ipaddress)
+ - lava-test-case step1a-$SIGNAL_PREFIX-cat-build-info --shell cat /system/build.prop
+ - lava-test-case step1b-$SIGNAL_PREFIX-getprop --shell getprop
+ - SERIALNO=$(getprop ro.serialno)
+ - IPADDR=$(getprop dhcp.eth0.ipaddress)
+ - if [ $ADB_LINK != "ETH" ] && [ ! -z $SERIALNO ]
+ - then
+ - IPADDR=$SERIALNO
+ - fi
+ - if [ $ADB_LINK = "ETH" ] && [ ! -z $IPADDR ]
+ - then
+ - lava-test-case step2-get-adb --shell getprop service.adb.tcp.port
+ - lava-test-case step3-set-adb --shell setprop service.adb.tcp.port 5555
+ - lava-test-case step4-set-adb-root --shell setprop service.adb.root 1
+ - lava-test-case step5-stop-adbd --shell stop adbd
+ - lava-test-case step6-start-adbd --shell start adbd
+ - fi
+ - if [ -z $SERIALNO ] && [ -z $IPADDR ]
+ - then
+ # if there is no serial number or IP address available, _MISSING_ is passed to the host
+ - IPADDR="_MISSING_"
+ - fi
+ - lava-test-case step7-$SIGNAL_PREFIX-send-ip --shell lava-send $SIGNAL_PREFIX-send-ip $SIGNAL_PREFIX-ipaddr=$IPADDR
- lava-test-case step8-$SIGNAL_PREFIX-multinode-sync --shell lava-sync $SIGNAL_PREFIX-finished
-