From 5c9b0c3facd02cd26ade32ac319f37f86229924f Mon Sep 17 00:00:00 2001 From: Donkie Date: Sun, 9 Jul 2023 00:54:01 +0200 Subject: [PATCH] Run script now fails if docker build fails --- tests_integration/run.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests_integration/run.py b/tests_integration/run.py index 2b3a089..3fbadd9 100644 --- a/tests_integration/run.py +++ b/tests_integration/run.py @@ -8,9 +8,13 @@ import sys if __name__ == "__main__": print("Building and running integration tests...") print("Building Spoolman...") - os.system("docker build -t donkie/spoolman:test .") + if os.system("docker build -t donkie/spoolman:test .") > 0: + print("Failed to build Spoolman!") + sys.exit(1) print("Building Spoolman tester...") - os.system("docker build -t donkie/spoolman-tester:latest tests_integration") + if os.system("docker build -t donkie/spoolman-tester:latest tests_integration") > 0: + print("Failed to build Spoolman tester!") + sys.exit(1) # Support input arguments for running only specific tests if len(sys.argv) > 1: