diff --git a/tests/testutils.py b/tests/testutils.py
index 3d39aaa17f30e27045bfdfb3ef25ebf985732e87..7c0d9bf8cf36b1e8b11358162fc79389d3b19fc0 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: