From 9afc17f3f8fee41285fa915264aac4ae52046efc Mon Sep 17 00:00:00 2001 From: Darko Poljak Date: Wed, 10 Oct 2018 10:37:29 +0200 Subject: [PATCH] Make cdist.test return exit code. --- cdist/test/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cdist/test/__main__.py b/cdist/test/__main__.py index 08e839d1..c8c7df3b 100644 --- a/cdist/test/__main__.py +++ b/cdist/test/__main__.py @@ -45,4 +45,5 @@ for test_module in test_modules: suites.append(suite) all_suites = unittest.TestSuite(suites) -unittest.TextTestRunner(verbosity=2).run(all_suites) +rv = unittest.TextTestRunner(verbosity=2).run(all_suites).wasSuccessful() +sys.exit(not rv)