2 util-linux regression tests
3 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
5 It's expected that for each invasive change or important bugfix you will
6 include a test to your patch.
8 Compile tests & run basic tests:
12 Note that the configure option --disable-static disables many of libmount and
15 Run all tests including tests that require root permissions:
18 # ./run.sh [--verbose] [--memcheck]
20 Alternatively using sudo and make:
22 $ make check TS_COMMAND="true"
23 $ sudo -E make check TS_OPTS="--parallel=1"
25 note that as root you have to manually remove output and diff directories
29 or run 'make clean' as root.
34 $ ./run.sh <test_directory-name>
41 The tests is possible to exclude by ./run.sh --exclude=<list> where the
42 <list> is blank separated test names in format "testdir/testname", for example:
44 $ ./run.sh --exclude="mount/move"
46 The --exclude is evaluated by the ./run.sh script only. See below
48 TS_OPT_testdir_[testscript_]fake=
50 environment variable which provides more powerful functionality to skip tests.
53 *** WARNING for root users ***
55 The tests touch your /etc/fstab, initialize loop devices or scsi_debug devices
56 if executed with root permissions.
58 Please, be careful and use these tests only for development and never on
67 Evaluated by "make check" to override the default command (run.sh).
69 - build all test dependencies, but skip the actual test
70 $ make check TS_COMMAND="true"
74 Evaluated by "make check" to pass options.to run.sh (see ./run.sh --help).
77 $ make check TS_OPTS="--parallel=1 utmp"
79 TS_OPT_testdir_[testscript_]fake="<yes|no>"
81 Evaluated by any test script to skip certain tests.
83 - skip all the tests within "fdisk" test-direcrory:
84 $ make check TS_OPT_fdisk_fake="yes"
86 - skip only "fdisk/bsd" test:
87 $ make check TS_OPT_fdisk_bsd_fake="yes"
89 - skip all "fdisk" tests except fdisk/bsd:
90 $ make check TS_OPT_fdisk_fake="yes" TS_OPT_fdisk_bsd_fake="no"
92 TS_OPT_testdir_[testscript_]known_fail="<yes|no>"
94 Similar usage like TS_OPT_*_fake above. "known_fail" means that the given
95 test will run but (negative) results will be ignored. The build log and test
96 diffs will still remind you about the issue.
98 TS_OPT_testdir_[testscript_]verbose="<yes|no>"
100 Set verbosity for certain tests. Similar usage like TS_OPT_*_fake above.
102 TS_OPT_testdir_[testscript_]memcheck="<yes|no>"
104 Run certain tests with valgrind. Similar usage like TS_OPT_*_fake above.
110 Travis CI - automatically executed for all github commits.
112 URL: https://travis-ci.org/karelzak/util-linux/
114 See .travis.yml for more details.
116 We require "sudo" to install additional stuff and to run the tests with
117 UID=0, it means that tests are executed on travis "legacy infrastructure".
120 Drone.oi - automatically executed for all github commits.
122 URL: https://drone.io/github.com/karelzak/util-linux
124 The drone.io does not use any in-tree config file (like travis-ci), the
125 currently used configuration (maintained by Drone.oi web UI):
128 MAKE_CHECK_OPTS="--skip-loopdevs --exclude=mount/move"
129 source ./.travis-functions.sh
130 travis_install_script || exit
131 travis_before_script || exit
133 travis_script || ret=$?
137 yes, it shares the setup functions with travis-ci.