[libvirt-php 3/6] tests: mark skipped tests with exit status 77

Daniel P. Berrangé berrange at redhat.com
Mon May 4 17:40:43 UTC 2020


Skipped tests should be distinguished from failed tests. Exit code
77 is a standard from autoconf.

Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
---
 tests/functions.phpt.in | 2 +-
 tests/runtests.sh       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/functions.phpt.in b/tests/functions.phpt.in
index 47dba2d..2ec3d79 100644
--- a/tests/functions.phpt.in
+++ b/tests/functions.phpt.in
@@ -26,7 +26,7 @@
 			bail("Invalid test name!");
 
 		printf("Test $name SKIPPED\n");
-		exit(1);
+		exit(77);
 	}
 
     $abs_srcdir = '@abs_srcdir@' ?: getcwd();
diff --git a/tests/runtests.sh b/tests/runtests.sh
index 8280be7..2674475 100755
--- a/tests/runtests.sh
+++ b/tests/runtests.sh
@@ -18,7 +18,7 @@ run_test()
 	ret=0
 
 	php -n -c "${srcdir}/php.ini" "${srcdir}/${name}.phpt"
-	if [ "x$?" != "x0" ]; then
+	if [ "x$?" != "x0" && "x$?" != "x77" ]; then
 		if [ "x$nf" == 'x1' ]; then
 			ret=1
 		else
-- 
2.26.2




More information about the libvir-list mailing list