From e010e1d20045eb37766932ca8a0ccbb412087a61 Mon Sep 17 00:00:00 2001 From: Ivan Nikolaev-Axenov Date: Thu, 4 Jul 2024 17:35:21 +0300 Subject: [PATCH] .gitlab-ci.yml updated v112 --- clr_test/clearing-all/launch_and_test.sh | 9 ++++++++- clr_test/run_test_docker_containers.py | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/clr_test/clearing-all/launch_and_test.sh b/clr_test/clearing-all/launch_and_test.sh index b10c03266..fae62173e 100644 --- a/clr_test/clearing-all/launch_and_test.sh +++ b/clr_test/clearing-all/launch_and_test.sh @@ -16,4 +16,11 @@ sleep 30 echo Run clearing-tester sh ./clearing_testing_utils/clearing-tester/clearing-tester.sh -echo Test finish. Exit code: $? +if [ $? -eq 0 ] +then + echo "Tests passed successfully" + exit 0 +else + echo "Tests failed" + exit 1 +fi \ No newline at end of file diff --git a/clr_test/run_test_docker_containers.py b/clr_test/run_test_docker_containers.py index 7dc07dcec..84c6d9e18 100644 --- a/clr_test/run_test_docker_containers.py +++ b/clr_test/run_test_docker_containers.py @@ -18,6 +18,8 @@ RESULT_FILES_DIR = os.environ['RESULT_FILES_DIR'] def run_docker(folder_name): logging.info(f"Running docker-compose for {folder_name}") os.chdir("clr_test") + subprocess.call('docker rm -f $(docker ps --all -q --filter ancestor=clr_test-db)', shell=True) + subprocess.call('docker rm -f $(docker ps --all -q --filter ancestor=clr_test-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)