aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/networking/netperf_install.bash
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/scenarios/networking/netperf_install.bash')
-rwxr-xr-xyardstick/benchmark/scenarios/networking/netperf_install.bash32
1 files changed, 32 insertions, 0 deletions
diff --git a/yardstick/benchmark/scenarios/networking/netperf_install.bash b/yardstick/benchmark/scenarios/networking/netperf_install.bash
new file mode 100755
index 000000000..eaa9f530a
--- /dev/null
+++ b/yardstick/benchmark/scenarios/networking/netperf_install.bash
@@ -0,0 +1,32 @@
+#!/bin/bash
+
+##############################################################################
+# Copyright (c) 2016 Huawei Technologies Co.,Ltd and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+set -e
+
+echo "===Install netperf before test begin!!!==="
+cp /etc/apt/sources.list /etc/apt/sources.list_bkp
+cp /etc/resolv.conf /etc/resolv.conf_bkp
+echo "nameserver 8.8.4.4" >> /etc/resolv.conf
+
+cat <<EOF >/etc/apt/sources.list
+deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
+deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
+deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
+deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
+deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
+EOF
+
+sudo apt-get update
+sudo apt-get install -y netperf
+
+service netperf start
+
+echo "===Install netperf before test end!!!==="