Include the ZBD tests in Travis runs such that the ZBD tests are run when a fio pull request is submitted from the github website. Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx> --- .travis.yml | 3 +++ Makefile | 14 ++++++++++++++ 2 files changed, 17 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4a87fe6c45f8..26ed74ab7416 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,7 @@ language: c +sudo: required +# Choose trusty because the default dist (xenial) does not have null_blk +dist: trusty os: - linux compiler: diff --git a/Makefile b/Makefile index fe02bf1df86f..803074e7db7f 100644 --- a/Makefile +++ b/Makefile @@ -530,6 +530,20 @@ doc: tools/plot/fio2gnuplot.1 test: fio ./fio --minimal --thread --exitall_on_error --runtime=1s --name=nulltest --ioengine=null --rw=randrw --iodepth=2 --norandommap --random_generator=tausworthe64 --size=16T --name=verifyfstest --filename=fiotestfile.tmp --unlink=1 --rw=write --verify=crc32c --verify_state_save=0 --size=16K + if modinfo null_blk >/dev/null 2>&1 && \ + sudo modprobe null_blk && \ + [ -e /sys/kernel/config/nullb ]; then \ + git clone https://github.com/hgst/libzbc && \ + (cd libzbc && \ + ./autogen.sh && \ + ./configure --prefix=/usr && \ + make -j && \ + sudo make install) && \ + sudo t/zbd/run-tests-against-regular-nullb && \ + if modinfo null_blk | grep -q '^parm:[[:blank:]]*zoned:'; then \ + sudo t/zbd/run-tests-against-zoned-nullb; \ + fi; \ + fi install: $(PROGS) $(SCRIPTS) tools/plot/fio2gnuplot.1 FORCE $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) -- 2.22.0