]> xenbits.xensource.com Git - libvirt.git/commit
Allow test cases to be run selectively
authorDaniel P. Berrange <berrange@redhat.com>
Thu, 18 Jul 2013 14:02:19 +0000 (15:02 +0100)
committerDaniel P. Berrange <berrange@redhat.com>
Fri, 19 Jul 2013 12:00:41 +0000 (13:00 +0100)
commitab92ae3338745b48134e7a374c1a3a5bffc4f110
treef7bc4462b90a91786380344f42b9534810e0f3ea
parentac0852c72a872be0abca855f29c4c9fa98747de9
Allow test cases to be run selectively

When debugging a failing test with many test cases, it is useful
to be able to skip most tests. Introducing a new environment
variable VIR_TEST_RANGE=N-M enables execution of only the test
cases numbered N-M inclusive, starting from 1.

For example, to skip all the cgroup tests except 2

$ VIR_TEST_RANGE=2-3 VIR_TEST_DEBUG=1 ./vircgrouptest
TEST: vircgrouptest
 2) New cgroup for driver                                             ... Unexpected found LXC cgroup: 1
libvirt: Cgroup error : Failed to create controller cpu for group: No such file or directory
FAILED
 3) New cgroup for domain driver                                      ... Cannot find LXC cgroup: 1
libvirt: Cgroup error : Failed to create controller cpu for group: No such file or directory
FAILED

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
tests/testutils.c