1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

69 Commits

Author SHA1 Message Date
Zdenek Kabelac
a59c3731c3 Improve test suite
Add make help target.
Add LVM_TEST_PARALLEL to support parallel runs of tests
Work around the problem the dmsetup table/info may return error
by using dmtable and dminfo function that will use 'should'.
(Error happens when some concurently running process removes table
entry while dmsetup command resolves table entries inside the loop.)
2012-03-28 11:10:08 +00:00
Zdenek Kabelac
813a1868c6 Use proper "" for absolute paths 2012-03-14 17:14:33 +00:00
Petr Rockai
1ea2c6a2f6 Run tests with lvmetad if we have it. 2012-02-15 14:24:31 +00:00
Zdenek Kabelac
8d7da8864e Cleanup files from testing
Cleanup generated files from coverage testing.
Do not skip standard .o compilation for lib/not and lib/harness.
Make a bit longer string in harness to fit new shell/ in.
2011-11-23 14:56:47 +00:00
Zdenek Kabelac
9fb16c608d Swap condition order
Swap condtion so the make line does not return 'false'.
Remove cleanup of lvm2api.sh since it is not created anymore.
2011-11-23 13:03:57 +00:00
Zdenek Kabelac
4b42d7ae98 Cleanup test makefiles
Simplify /api makefile and use SUBDIRS target for test dir.
Properly cleanup Makefiles with distclean in /test.
Use symbolic links for shell scripts for non-srcdir compilation.
2011-11-23 12:21:41 +00:00
Petr Rockai
f2a3f0fe3d Tidy the shell tests into their own subdir. We now have:
- test/lib -- infrastructure and helper code
- test/api -- liblvm2app API tests
- test/unit -- C-based unit tests
- test/shell -- shell-based functional tests
2011-11-21 00:15:42 +00:00
Petr Rockai
cfe1ec8d1f Fix a syntax error. 2011-11-20 21:55:24 +00:00
Petr Rockai
d4fed28523 Implement a CUnit-based runner for unit tests. Copy and adapt (actual unit)
tests from unit-tests/*/*_t.c (now under test/unit). The valgrind/pool test is
missing, since it's not really a unit test and probably not too valuable
either. Available via "make unit" (and if --enable-testing was passed to
configure, also executed by make check).
2011-11-20 21:43:20 +00:00
Zdenek Kabelac
a4b6b51757 Improvements
Simplify RUN_BASE

Put .tests-stamp deps only for check target and fix its cleanup.
Fix abs_top_srcdir.
vgimportclone needs  srcdir.
Clean  api subdir.
2011-09-24 21:10:19 +00:00
Zdenek Kabelac
08885c4b92 Ensure fsadm.sh is executable
When the srcdir == builddir we get the link on non-exectable file.
So make always sure fsadm.sh is executable script file.

Add cleanup target for lib/fsadm.
2011-09-19 15:54:15 +00:00
Zdenek Kabelac
438f53af63 Add link for fsadm script
Prepare to enabling t-fsadm.sh test
2011-09-19 12:50:17 +00:00
Petr Rockai
615534d305 A compromise integration of LVMetaD into the build: I have kept all the
daemon/common code in a single libdaemon.a, which is completely private. This
is currently linked into the lvmetad binary, and will be linked into LVM (the
client part, since static linking only picks up only symbols that are actually
used). I have also added --enable/disable-lvmetad to ./configure; although the
current default is off, I expect this to be flipped to on shortly. There's no
LVM-side support yet, but when there is, even when built, it'll still need to
be enabled by an lvm.conf option.
2011-08-31 11:31:57 +00:00
Zdenek Kabelac
9ecab00d26 Add missing cleanup for vgimportclone script 2011-04-28 22:17:06 +00:00
Dave Wysochanski
954dc4e8a6 Add vgimportclone symlink for nightly test. 2011-04-21 17:42:58 +00:00
Petr Rockai
cf83eac6fe Always copy all tests to builddir regardless of T/S, since subsequent runs
(possibly with different T or S) skip that step.
2011-04-19 15:28:17 +00:00
Zdenek Kabelac
e84c7c7c63 Remove -f from list of targets for cleanup
rm -f is already in used for this cleanup.
2011-01-17 15:18:10 +00:00
Zdenek Kabelac
84b6fab321 Include default make.tmpl
Use default clean targets for this Makefile
Use also same build flags for compiling testing tools like harness.
2011-01-13 14:58:59 +00:00
Petr Rockai
62fbc0a033 Fix up the make clean target in test/. 2011-01-07 12:26:02 +00:00
Petr Rockai
1b7c4b9bce Substantial rework of the functional test support code. Some new features:
- somewhat neater, more consistent and more readable output
- possible to set any lvm.conf value: aux lvmconf "section/key = value"
- LVM_TEST_NODEBUG to suppress the (lengthy) "## DEBUG" output
- back-substitution on test output ($TESTDIR/$PREFIX -> @TESTDIR@/@PREFIX@)
- support code moved from test/ to test/lib/ --> less clutter
2011-01-05 00:16:18 +00:00
Petr Rockai
af979c3b2d Fix sed substitution in copying tests to builddir (test/Makefile.in). 2010-12-14 23:23:45 +00:00
Petr Rockai
d6d4e462a4 Hack up the RUN_BASE computation in the test Makefile.in a bit more (so that it
actually works... sometimes).
2010-12-14 17:38:42 +00:00
Petr Rockai
caa443ae49 Fix the sed expression to get "base" names of tests. 2010-12-12 21:17:25 +00:00
Petr Rockai
4f8eeb2a06 Only build the required bits under api/ on make check. 2010-12-12 21:08:00 +00:00
Petr Rockai
5f4dc7f957 First go at a somewhat more comprehensive mechanism to run "unit" tests for the
lvm2app API. Further factoring of the support code needed. RHBZ 654445
2010-12-12 20:36:38 +00:00
Petr Rockai
e3e64c8ea4 Add a VERBOSE option to make check (make check VERBOSE=1). 2010-10-14 14:36:26 +00:00
Petr Rockai
1c45bab17f Add an option to skip some tests in make check (regex based, like T=): eg.
$ sudo make check S='mirror-basic|fsadm'
2010-10-12 16:17:25 +00:00
Petr Rockai
d74800fd23 Run tests in alphabetical (and thus stable across machines) order. 2010-05-12 11:59:46 +00:00
Petr Rockai
15bd6a29b9 Revert the "repeat failed tests with -vvvv" feature. Instead, dump debug logs
to a file using log/file, with log/overwrite set and dump this file in
STACKTRACE. The overall effect is that only the command that ran last before
the failure has been triggered will get its debug output logged. This is
similar to how we treat coredumps.
2010-05-12 11:23:16 +00:00
Petr Rockai
b52496b7af Add some basic provisions for automated testing of dmeventd. 2010-05-06 18:54:51 +00:00
Petr Rockai
d6b9d2cbc3 Add a "should" alongside "not" to the test utilities. When a "should" command
fails, the test will carry on but will issue a warning. The harness detects
such warnings from tests and marks tests that passed with warnings with a
special status.
2010-04-30 14:33:39 +00:00
Petr Rockai
a2263de0a3 Add check_cluster and check_local targets in addition to just "check". 2010-04-13 13:28:52 +00:00
Petr Rockai
468667effa Make it easy to run just a subset of tests by saying make check T="regex". 2010-04-13 06:45:53 +00:00
Petr Rockai
bedabf92f3 Add a new helper script for the testsuite, that makes checking for various
(lvm) properties easier and produces nicer output.
2010-04-12 19:02:59 +00:00
Zdenek Kabelac
23b059e7b7 INSTALL rules updates
Patch is inspired by Debian's extra patch.

- removes OWNER & GROUP make vars they are parts of INSTALL command.
- adds INSTALL_PROGRAM for executable, uses $(INSTALL)
- adds INSTALL_DATA for non-executable data, uses ($INSTALL)
- adds INSTALL_WDATA for writable non-executable data, uses ($INSTALL)
- adds configure option --enable-write_install - to support
  installatin of writable files used by distribution
- replaces usage of ifeq @LIB_SUFFIX@ with $(LIB_SUFFIX)
- installs .a files from static builds without executable flag
- installs .a files to $(usrlibdir) instead of $(libdir)
- installs all static binaries to $(staticdir)
- create .so links for devel package in $(usrlibdir) instead of
  $(libdir)
- makes .so and .so.LIB_VERSION files within builddir
- removes VERSIONED_SHLIB and created versioned LIB_SHARED automagicaly
- install LIB_SHARED via install_lib_shared target
- install plugins via install_lib_shared_plugin target
- prints whole 'install' command during installation instead of less
  informative "Installing  $(something) $(somewhere)"
- install multiple man pages with one INSTALL command
- use DISTCLEAN_TARGETS instead of creating multiple distclean targets
2010-04-09 21:42:48 +00:00
Petr Rockai
ed5686d981 Refactor the test utilities, dropping the legacy test-lib.sh and curtailing
lvm-utils.sh. Clears up lots of unused code, should have little observable
impact (it does change test directory layout slightly).
2010-04-07 14:46:26 +00:00
Zdenek Kabelac
43e3c22ae4 Missed to convert T -> SCRIPTS 2010-03-31 23:05:20 +00:00
Zdenek Kabelac
c9895ac01e Fix also error code from clean:
And fix previous commit which missed test.
2010-03-29 15:53:11 +00:00
Zdenek Kabelac
1e070872a3 Oops, avoid returning errors from shell to makefile for builddir == srcdir 2010-03-29 15:39:25 +00:00
Zdenek Kabelac
051e55b12b Split long line in Makefile and keep $abs_top_buildir as shell variable
within init.sh.
2010-03-29 14:19:42 +00:00
Zdenek Kabelac
b7be589ed0 Fixing another set of distclean problems where we left some generated files
in clvmd, dmevend, man, tests.

Don't include dependency files for clow and cscope.out targets

Improve dependency tracking for dmeventd and liblvm2cmd sources.
2010-03-29 14:17:59 +00:00
Petr Rockai
c7ee154ba9 Run both locking_type 1 and 3 tests (forgot to uncomment locking_type 1 before
last checkin).
2010-03-18 09:28:42 +00:00
Petr Rockai
649c45078f Add infrastructure for running the functional testsuite with locking_type set
to 3, using a local (singlenode) clvmd.
2010-03-18 09:19:30 +00:00
Peter Rajnoha
be40fe90ae Use udev transactions in testsuite. 2010-02-15 16:30:13 +00:00
Peter Rajnoha
4df024c40c Define {DM, LVM}_UDEV_DISABLE_CHECKING=1 env. variables for tests.
We need to disable udev checking for our tests since they use their own
location for device nodes and symlinks.
2010-01-11 15:48:49 +00:00
Petr Rockai
42812732a3 The sourcedir instances of the test scripts are not PHONY. 2009-11-30 16:58:53 +00:00
Petr Rockai
1bedaf742a Don't fail in the builddir == srcdir case, though. (testsuite) 2009-11-30 16:56:42 +00:00
Petr Rockai
be46b5e5a8 More fixes for the testsuite in the $(builddir) != $(srcdir) situation. 2009-11-30 14:59:26 +00:00
Petr Rockai
e7a5c8cf3d Fix the dmeventd LD_LIBRARY_PATH in the testsuite. 2009-11-19 12:01:39 +00:00
Petr Rockai
1ace1b5ddf Rudimentary support for running testsuite in a builddir != srcdir situation. 2009-11-02 15:16:21 +00:00