#!/bin/sh if [ $# -ne 2 ]; then echo 'Usage: target-run addrlist applist' exit fi addrlist=$1 applist=$2 BUILD_DIR=/var/www/webkit PKG=webkit2-efl run_with_error() { ssh target $@ 2>> error } run() { ssh target $@ 2> /dev/null } upload() { scp $1 target: 2> /dev/null } download() { scp target:$1 . 2> /dev/null } upload $addrlist upload $applist upload `dirname $0`/prepare upload `dirname $0`/run upload `dirname $0`/wrt-run mkdir -p result last=`ls -v result | tail -n 1` if [ -z $last ]; then last=0; fi for build in `ls -v $BUILD_DIR`; do if [ $build -gt $last ]; then echo Testing build $build with $addrlist and $applist run ./prepare rpm_host=$BUILD_DIR/$build/$PKG-[0-9]*.armv7l.rpm upload $rpm_host rpm_target=`basename $rpm_host` run rpm --upgrade --force $rpm_target rpm_success=$? run rm $rpm_target if [ ! $rpm_success -eq 0 ]; then echo Build fails to install continue fi run_with_error ./run $addrlist run_with_error ./wrt-run $applist download /tmp/webkit_memory if [ ! -f webkit_memory ]; then echo Build has no memory profiling continue fi mv webkit_memory result/$build fi done