2 ##############################################################################
3 # Copyright (c) 2017 Huawei Technologies Co.,Ltd and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
12 apt-get update && apt-get install -y \
32 python-setuptools && \
33 easy_install -U setuptools
35 apt-get -y autoremove && apt-get clean
39 source_file=/etc/apt/sources.list
40 sed -i -e 's/^deb \([^/[]\)/deb [arch=amd64] \1/g' "${source_file}"
41 sed -i -e 's/^deb-src /# deb-src /g' "${source_file}"
43 sub_source_file=/etc/apt/sources.list.d/yardstick.list
44 touch "${sub_source_file}"
45 echo -e "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty main universe multiverse restricted
46 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main universe multiverse restricted
47 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-security main universe multiverse restricted
48 deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ trusty-proposed main universe multiverse restricted" > "${sub_source_file}"
49 echo "vm.mmap_min_addr = 0" > /etc/sysctl.d/mmap_min_addr.conf
50 dpkg --add-architecture arm64
51 apt-get install -y qemu-user-static libc6:arm64
53 # install yardstick + dependencies
55 pip install -r requirements.txt