From 70c44d006dd5d028927c4861cd9c4d702817d00a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20K=C3=A4berich?= Date: Mon, 22 Apr 2024 12:26:13 +0200 Subject: [PATCH] add return value to tests, allow GUI to start without display --- .github/workflows/HIL_Tests.yml | 1 + Software/Integrationtests/Integrationtest.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/HIL_Tests.yml b/.github/workflows/HIL_Tests.yml index d36e457..5c1e4d1 100644 --- a/.github/workflows/HIL_Tests.yml +++ b/.github/workflows/HIL_Tests.yml @@ -55,5 +55,6 @@ jobs: - name: Run HIL tests run: | cd Software/Integrationtests + export DISPLAY=:0 python3 Integrationtest.py diff --git a/Software/Integrationtests/Integrationtest.py b/Software/Integrationtests/Integrationtest.py index b7c0af2..8a8d29e 100644 --- a/Software/Integrationtests/Integrationtest.py +++ b/Software/Integrationtests/Integrationtest.py @@ -21,4 +21,6 @@ for t in testmodules: # else, just load all the test cases from the module. suite.addTest(unittest.defaultTestLoader.loadTestsFromName(t)) -unittest.TextTestRunner().run(suite) +result = unittest.TextTestRunner(verbosity=2).run(suite) +exit(int(not result.wasSuccessful())) +