mirror of
https://github.com/AuxXxilium/yet-another-bench-script.git
synced 2024-11-23 23:01:02 +07:00
61 lines
1.4 KiB
Bash
Executable File
61 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# Activate Holy Build Box lib compiliation environment
|
|
source /hbb/activate
|
|
|
|
set -x
|
|
|
|
# temp workaround to fix issue with phusion's repo
|
|
rm -f /etc/yum.repos.d/phusion_centos-6-scl-i386.repo
|
|
|
|
yum install -y yum-plugin-ovl # fix for docker overlay fs
|
|
yum install -y xz
|
|
|
|
# determine arch
|
|
ARCH=$(uname -m)
|
|
if [[ $ARCH = *x86_64* ]]; then
|
|
# container is 64-bit
|
|
ARCH="x64"
|
|
elif [[ $ARCH = *i?86* ]]; then
|
|
# container is 32-bit
|
|
ARCH="x86"
|
|
fi
|
|
|
|
|
|
# download, compile, and install libaio as static library
|
|
cd ~
|
|
curl -L http://ftp.de.debian.org/debian/pool/main/liba/libaio/libaio_0.3.112.orig.tar.xz -o "libaio.tar.xz"
|
|
tar xf libaio.tar.xz
|
|
cd libaio-*/src
|
|
ENABLE_SHARED=0 make prefix=/hbb_exe install
|
|
|
|
# Activate Holy Build Box exe compilation environment
|
|
source /hbb_exe/activate
|
|
|
|
# download and compile fio
|
|
cd ~
|
|
curl -L https://github.com/axboe/fio/archive/fio-3.27.tar.gz -o "fio.tar.gz"
|
|
tar xf fio.tar.gz
|
|
cd fio-fio*
|
|
./configure --disable-native
|
|
make
|
|
|
|
# verify no external shared library links
|
|
libcheck fio
|
|
# copy fio binary to mounted dir
|
|
cp fio /io/fio_$ARCH
|
|
|
|
# download and compile iperf
|
|
cd ~
|
|
curl -L https://github.com/esnet/iperf/archive/3.10.tar.gz -o "iperf.tar.gz"
|
|
tar xf iperf.tar.gz
|
|
cd iperf*
|
|
./configure --disable-shared --disable-profiling
|
|
make
|
|
|
|
# verify no external shared library links
|
|
libcheck src/iperf3
|
|
# copy iperf binary to mounted dir
|
|
cp src/iperf3 /io/iperf3_$ARCH
|