Commit Graph

11 Commits

Author SHA1 Message Date
Richard W.M. Jones
6d32773e81 tests: Run the tests in parallel.
Before this change the tests ran in about 12m34 and afterwards in
about 6m20, although the real change is more dramatic if you only run
tests from the tests/ subdirectory (as language tests still run serially).

This breaks valgrinding for now, which I intend to fix properly later.
2021-03-18 16:28:55 +00:00
Richard W.M. Jones
e62a443165 tests: Provide a way for skipping tests/bigdirs/test-big-dirs.pl.
This test is currently broken because of a kernel bug
(https://bugzilla.redhat.com/show_bug.cgi?id=1657200).
2018-12-11 17:53:29 +00:00
Richard W.M. Jones
0108240364 tests: Fix 'make check-slow'.
Since we started to use the parallel tests framework in automake,
'make check-slow' has been broken.  This is because parallel tests
doesn't allow you to run 'make check TESTS=...' with a set of test
scripts which do not also appear in the static list of tests in the
Makefile.am.  We would like to list and run only "fast" tests in the
Makefile.am, and have other scripts for slow tests.

The solution is to add the slow tests to Makefile.am, but condition
those tests on an environment variable SLOW=1 being set.

This commit fixes all the existing slow tests in this way, and updates
the documentation (guestfs-hacking(1)) to document how slow tests
should be written in future.
2016-04-16 20:40:49 +01:00
Pino Toscano
b5a6f899cd actions: turn some params into FilenameList (RHBZ#1174551).
Use FilenameList as type for lists of file names, as used in some
listing-alike APIs.  This way we can ensure anything different than just
file names in those lists is rejected outright.

As a consequence, test-big-dirs.pl does not need to prepend the
directory name anymore before calling listing-alike APIs: previously
they didn't fail, but the returned lists contained only invalid
elements (and only their size was checked).

Furthermore, add a new regression test for it.
2015-10-21 13:00:18 +02:00
Pino Toscano
d98c9c0e0b Fix shebang in perl scripts
Instead of hardcoding the location of perl (assuming it is installed in
/usr), use /usr/bin/env to run it, and thus picking it from $PATH.
This makes it possible to run these scripts also on installations with
perl in a different prefix than /usr.

Also, given that we want enable warnings on scripts, turn the -w
previously in shebang to explicit "use warnings;" in scripts which
didn't have it before.
2015-10-05 15:43:35 +02:00
Richard W.M. Jones
14fabcd88e tests: Use new guestfs_add_drive_scratch API where possible in tests.
Replaces code such as:

  fd = open "test1.img"
  ftruncate fd, size
  close fd
  g.add_drive "test1.img"

with the shorter and simpler:

  g.add_drive_scratch size
2013-07-20 16:31:42 +01:00
Richard W.M. Jones
ee5f18293b tests: Add 'make check-slow' rule to recursively run slow/long-running tests. 2012-11-13 15:26:29 +00:00
Wanlong Gao
45d459f402 Fix tests/bigdirs/test-big-dirs.pl to use mke2fs
Let tests/bigdirs/test-big-dirs.pl uses mke2fs to create small
inode ratio files.

Signed-off-by: Wanlong Gao <gaowanlong@cn.fujitsu.com>

RWMJ:
 - Fix invocation of mke2fs with optional arguments.
 - Run the test to check it works.
2012-09-24 16:41:07 +01:00
Richard W.M. Jones
a297a9348f tests/bigdirs: Add empty TESTS= rule.
Without this empty rule, automake doesn't generate the rest of the
testing infrastructure, so you can't enable the test yourself by doing
'make check TESTS=test-big-dirs.pl'.
2012-09-24 16:40:46 +01:00
Richard W.M. Jones
2d6bf3ba70 tests/big-dirs: Don't run this test by default. 2012-08-30 08:58:00 +01:00
Richard W.M. Jones
92a0ac5037 tests: Add a test for large directories.
This also tests the reimplemented APIs:
 - ls
 - lstatlist
 - lxattrlist
 - readlinklist
2012-08-17 16:08:14 +01:00