3 # This is a smoke test of bcachefs-tools.
5 # It builds the source with multiple options (debug, release, valgrind, FUSE)
6 # and runs the test suite.
8 # Returns 0 on success, nonzero on any failure.
12 # valgrind, python3-pytest, python3-pytest-xdist
14 # On debian/ubuntu based systems, install with:
16 # apt install valgrind python3-pytest python3-pytest-xdist
18 # You also currently need fuse 3.7 or later. Fuse 3.7 unfortunately requires
19 # debian sid or bullseye at this time, so you may need to install from source.
24 unset BCACHEFS_FUSE BCACHEFS_TEST_USE_VALGRIND D
26 trap "set +x; cat ${spam}; rm -f ${spam} ; echo; echo FAILED." EXIT
28 echo -- Verify dependencies --
29 pkg-config --atleast-version 3.7.0 fuse3
30 python3 -c "import pytest"
31 python3 -c "import xdist"
32 which valgrind > /dev/null
38 make -j ${JOBS} clean > ${spam} 2>&1
39 make -j ${JOBS} tests bcachefs > ${spam} 2>&1
52 echo Running tests with valgrind.
54 export BCACHEFS_TEST_USE_VALGRIND=yes
61 echo -- Test: default --
65 echo -- Test: debug --
70 echo -- Test: debug with valgrind --
73 echo -- Test: fuse debug --
74 export BCACHEFS_FUSE=1
78 echo -- Test: fuse debug with valgrind --
82 trap "set +x; echo; echo SUCCESS." EXIT