From 4848cb3d9fd3f7a13a9ac5166b97a594dc67d2ab Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Thu, 29 Nov 2018 18:45:30 +0100 Subject: test: execute g_test_run when tests are skipped Sometimes a test's main() function recognizes that the environment does not support the test, and therefore exits. In this case, we still should run g_test_run() so that a TAP harness will print the test plan ("1..0") and the test will be marked as skipped. Signed-off-by: Paolo Bonzini Message-Id: <1543513531-1151-2-git-send-email-pbonzini@redhat.com> Reviewed-by: Eric Blake Reviewed-by: Thomas Huth Signed-off-by: Paolo Bonzini --- tests/cdrom-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/cdrom-test.c') diff --git a/tests/cdrom-test.c b/tests/cdrom-test.c index 9b43dc9ab4..14bd981336 100644 --- a/tests/cdrom-test.c +++ b/tests/cdrom-test.c @@ -169,7 +169,7 @@ int main(int argc, char **argv) if (exec_genisoimg(genisocheck)) { /* genisoimage not available - so can't run tests */ - return 0; + return g_test_run(); } ret = prepare_image(arch, isoimage); -- cgit v1.2.3-55-g7522