summaryrefslogtreecommitdiff
path: root/benchmark.sh
blob: ce4891a1b924532c5a3a61c80c54e6a89d14b0d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/bash
set -u
set -o pipefail

if ! ssh-add -l; then
  echo "No agent key - reconnect with agent forwarding" >&2
  exit 1
fi

if ! test -e ~/data; then
  mkdir ~/data || exit 1
  if ! ssh-keygen -P '' -f ~/data/onetime < /dev/null; then
    rm -rf ~/data
    exit 1
  fi
fi

if ! test -e ~/src; then
  mkdir ~/src || exit 1
  if ! git clone -b bernie/benchmarking http://git.linaro.org/toolchain/abe ~/src/abe; then
    rm -rf ~/src
    exit 1
  fi
fi

if ! test -e ~/work; then
  mkdir ~/work
  if ! (cd work; ~/src/abe/configure --with-fileserver=148.251.136.42 --with-remote-snapshots=/snapshots-ref); then
    rm -rf ~/work
    exit 1
  fi
fi

export LAVA_SSH_KEYFILE=${HOME}/onetime
export LAVA_IN_LAB=1
export LAVA_SERVER=${1}@validation.linaro.org

~/work/abe/scripts/benchmark.sh -b $2 -i $3 kvm