-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
executable file
·63 lines (54 loc) · 1.23 KB
/
setup.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
#!/bin/bash
# setup.sh
# by: Prem Karat ([email protected])
# (C) Copyright MontaVista 2015
# Licensed under the GPL
#
# WARNING: THIS WILL LIKELY HARDHANG SYSTEMS AND MAY LOSE DATA
# RUN AT YOUR OWN RISK!
echo "Checking if bonnie++ is installed"
which bonnie++
if [ $? -ne 0 ] ; then
echo "bonnie++ not installed"
exit 1
fi
echo "Checking if hackbench is installed"
which hackbench
if [ $? -ne 0 ] ; then
echo "hackbench not installed"
exit 1
fi
echo "Checking if cyclictest is installed"
which cyclictest
if [ $? -ne 0 ] ; then
echo "cyclictest not installed"
exit 1
fi
echo "Checking if mpstat is installed"
which mpstat
if [ $? -ne 0 ] ; then
echo "mpstat not installed"
exit 1
fi
echo "Building kernel test tools"
cd kerntest
make
if [ $? -ne '0' ]; then
echo 'Failed to kernel test tools'
exit 1
fi
cd ..
echo "kernel test tools build complete"
echo
echo "Building futex stress tool"
cd loadgen
tar -xzvf futex-stress.tgz
cd futex-stress
make
if [ $? -ne '0' ]; then
echo 'Failed to build futex stress'
exit 1
fi
cp futexstress ../
echo "futex stress tool build complete"
exit 0