-
Notifications
You must be signed in to change notification settings - Fork 5
/
run_ubbd_tests.sh
executable file
·48 lines (34 loc) · 1.4 KB
/
run_ubbd_tests.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
#!/bin/bash
set -e
export UBBD_TESTS_SETUP_WITHOUT_PKG="yes"
replace_option()
{
file=$1
old=$2
new=$3
sed -i "s#${old}#${new}#" ${file}
}
./run_check.sh
git clone https://github.com/DataTravelGuide/ubbd-tests
git clone https://github.com/DataTravelGuide/ubbd-kernel
git clone https://github.com/kdave/xfstests
env DEBIAN_FRONTEND=noninteractive apt install -y xfslibs-dev uuid-dev libtool-bin e2fsprogs automake gcc libuuid1 quota attr make libacl1-dev libaio-dev xfsprogs libgdbm-dev gawk fio dbench uuid-runtime
UBBD_DIR=`pwd`
UBBD_TESTS_DIR="${UBBD_DIR}/ubbd-tests"
UBBD_KERNEL_DIR="${UBBD_DIR}/ubbd-kernel"
XFSTESTS_DIR="${UBBD_DIR}/xfstests"
cd ${XFSTESTS_DIR}
make
cd ${UBBD_TESTS_DIR}
mkdir test
mkdir scratch
cp local_conf.example local_conf
replace_option local_conf "UBBD_DIR=.*" "UBBD_DIR=\"${UBBD_DIR}\""
replace_option local_conf "UBBD_TESTS_DIR=.*" "UBBD_TESTS_DIR=\"${UBBD_TESTS_DIR}\""
replace_option local_conf "UBBD_KERNEL_DIR=.*" "UBBD_KERNEL_DIR=\"${UBBD_KERNEL_DIR}\""
replace_option local_conf "UBBD_TESTS_XFSTESTS_DIR=.*" "UBBD_TESTS_XFSTESTS_DIR=\"${XFSTESTS_DIR}\""
replace_option local_conf "XFSTESTS_SCRATCH_MNT=.*" "XFSTESTS_SCRATCH_MNT=\"${UBBD_TESTS_DIR}/scratch\""
replace_option local_conf "XFSTESTS_TEST_MNT=.*" "XFSTESTS_TEST_MNT=\"${UBBD_TESTS_DIR}/test\""
replace_option local_conf "FIOTEST_OUTFILE=.*" "FIOTEST_OUTFILE=\"fio_output.cvs\""
cat local_conf
./test_all.sh quick