[gnome-bluetooth/wip/hadess/fix-tests: 3/5] tests: Return correct exitcode for skipped tests




commit a65bab814c7fb86ae09e740cf94adc570185ca69
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Nov 30 15:56:10 2021 +0100

    tests: Return correct exitcode for skipped tests
    
    See https://mesonbuild.com/Unit-tests.html#skipped-tests-and-hard-errors

 tests/integration-test | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/integration-test b/tests/integration-test
index 77b1afbd..b10b5393 100755
--- a/tests/integration-test
+++ b/tests/integration-test
@@ -33,7 +33,7 @@ try:
     from gi.repository import Gtk
 except ImportError as e:
     sys.stderr.write('Skipping tests, PyGobject not available for Python 3, or missing GI typelibs: %s\n' % 
str(e))
-    sys.exit(0)
+    sys.exit(77)
 
 try:
     gi.require_version('GIRepository', '2.0')
@@ -52,7 +52,7 @@ try:
     import dbusmock
 except ImportError:
     sys.stderr.write('Skipping tests, python-dbusmock not available 
(http://pypi.python.org/pypi/python-dbusmock).\n')
-    sys.exit(0)
+    sys.exit(77)
 
 # Out-of-process tests
 class OopTests(dbusmock.DBusTestCase):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]