Merge "Bug fix in SFC test case"
[yardstick.git] / yardstick / benchmark / scenarios / networking / netperf_install.bash
1 #!/bin/bash
2
3 ##############################################################################
4 # Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
5 #
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Apache License, Version 2.0
8 # which accompanies this distribution, and is available at
9 # http://www.apache.org/licenses/LICENSE-2.0
10 ##############################################################################
11
12 set -e
13
14 echo "===Install netperf before test begin!!!==="
15 cp /etc/apt/sources.list /etc/apt/sources.list_bkp
16 cp /etc/resolv.conf /etc/resolv.conf_bkp
17 echo "nameserver 8.8.4.4" >> /etc/resolv.conf
18
19 cat <<EOF >/etc/apt/sources.list
20 deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
21 deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
22 deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
23 deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
24 deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
25 EOF
26
27 sudo apt-get update
28 sudo apt-get install -y netperf
29
30 service netperf start
31
32 echo "===Install netperf before test end!!!==="