-
Notifications
You must be signed in to change notification settings - Fork 4
/
install-deps.sh
executable file
·69 lines (58 loc) · 1.07 KB
/
install-deps.sh
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
#
# SPDX-License-Identifier: GPL-2.0
#
# Copyright (c) 2018 Intel Corporation
#
# Authors: Fengguang Wu <[email protected]>
#
has_cmd()
{
command -v "$1" >/dev/null
}
debian_install()
{
pkgs=(
make
gcc
g++
numactl
libnuma-dev
libyaml-cpp-dev
ruby
diffstat
libasan4 # for gcc-7
)
sudo apt-get install "${pkgs[@]}"
}
rhel_install()
{
pkgs=(
gcc-c++
libstdc++
numactl
numactl-libs
numactl-devel
yaml-cpp-devel
diffstat
libasan
)
sudo yum install "${pkgs[@]}"
}
if has_cmd apt-get; then
debian_install
elif has_cmd yum; then
rhel_install
else
echo "unknown system"
fi
cat <<EOF
# tests/run-vm-tests.rb may need the "usemem" tool from
git clone https://git.kernel.org/pub/scm/linux/kernel/git/wfg/vm-scalability.git
cd vm-scalability && make usemem && sudo cp usemem /usr/local/bin/
# need latest sysbench for benchmarks
git clone https://github.com/akopytov/sysbench
cd sysbench && ./autogen.sh && ./configure && make && sudo cp src/sysbench /usr/local/bin/
EOF
rm -rf pmu-tools
git clone https://github.com/andikleen/pmu-tools.git