diff --git a/clr_test/clearing-all/launch_and_test.sh b/clr_test/clearing-all/launch_and_test.sh index 6170c6205..b10c03266 100644 --- a/clr_test/clearing-all/launch_and_test.sh +++ b/clr_test/clearing-all/launch_and_test.sh @@ -16,6 +16,4 @@ sleep 30 echo Run clearing-tester sh ./clearing_testing_utils/clearing-tester/clearing-tester.sh -ls -la clearing_testing_utils/store/results/ - echo Test finish. Exit code: $? diff --git a/clr_test/run_test_docker_containers.py b/clr_test/run_test_docker_containers.py index ab19a2a00..7dc07dcec 100644 --- a/clr_test/run_test_docker_containers.py +++ b/clr_test/run_test_docker_containers.py @@ -1,5 +1,6 @@ import os import re +import sys import time import shutil import subprocess @@ -15,14 +16,19 @@ RESULT_FILES_DIR = os.environ['RESULT_FILES_DIR'] def run_docker(folder_name): - print(f"Running docker-compose for {folder_name}") + logging.info(f"Running docker-compose for {folder_name}") os.chdir("clr_test") - subprocess.call('docker compose pull', shell=True) - subprocess.call('docker compose build --no-cache', shell=True) - subprocess.call('docker compose up --abort-on-container-exit --exit-code-from clearing_system', shell=True) + subprocess.call('docker rmi -f clr_test-db', shell=True) + subprocess.call('docker rmi -f clr_test-clearing_system', shell=True) + code = subprocess.call('docker compose up --abort-on-container-exit --exit-code-from clearing_system', shell=True) logging.info(os.listdir(f"{CLR_TEST_DIR}/mnt/results")) os.chdir("..") + if code != 0: + sys.exit(code) + + return code + def change_date(folder_name): pattern = r"((?<=clearing-tester\.mock-date-for-sdf=)|(?<=clearing-tester\.mock-date-for-execution=))(.+)"