From 360eeecd720466dfc4951284eaac2bb9573f1a2a Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@collabora.com>
Date: Tue, 9 Jun 2020 19:03:21 +0100
Subject: [PATCH] testutils: Exit 1 on failure

At the moment the Python-based tests rely on being run under prove(1)
so that their TAP output is parsed, but I'm about to add a test that
enters a container and runs another test script inside the container,
and using TAP for that is less obvious. Don't rely on our stdout being
parsed as TAP.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 tests/testutils.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/testutils.py b/tests/testutils.py
index 3d39aaa17..7c0d9bf8c 100644
--- a/tests/testutils.py
+++ b/tests/testutils.py
@@ -5,6 +5,7 @@
 import logging
 import os
 import subprocess
+import sys
 import tempfile
 import unittest
 
@@ -132,5 +133,6 @@ def test_main():
                 'not ok 1 - %r (tap module not available)'
                 % program.result
             )
+            sys.exit(1)
 
 # vi: set sw=4 sts=4 et:
-- 
GitLab