Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

Commit dd63c58f authored by Marion Goedel's avatar Marion Goedel
Browse files

[BUGFIX] CI setup. If-statement about OSM Tests was wrong.

parent 62f3ba48
Pipeline #65905 failed with stages
in 1 minute and 39 seconds
...@@ -16,7 +16,7 @@ import subprocess ...@@ -16,7 +16,7 @@ import subprocess
import time import time
# exclude output and legacy to make sure that if used locally, .scenario files in these directories are not used # exclude output and legacy to make sure that if used locally, .scenario files in these directories are not used
def find_scenario_files(path="VadereModelTests", scenario_search_pattern = "*.scenario", exclude_patterns = ["TESTOVM","output","legacy"]): def find_scenario_files(path="C:/Daten/Repos/vadere/VadereModelTests", scenario_search_pattern = "*.scenario", exclude_patterns = ["TESTOVM","output","legacy"]):
scenario_files = [] scenario_files = []
for root, dirnames, filenames in os.walk(path): for root, dirnames, filenames in os.walk(path):
...@@ -39,7 +39,7 @@ def find_scenario_files(path="VadereModelTests", scenario_search_pattern = "*.sc ...@@ -39,7 +39,7 @@ def find_scenario_files(path="VadereModelTests", scenario_search_pattern = "*.sc
return sorted(scenario_files) return sorted(scenario_files)
def run_scenario_files_with_vadere_console(scenario_files, vadere_console="VadereGui/target/vadere-console.jar", scenario_timeout_in_sec=60): def run_scenario_files_with_vadere_console(scenario_files, vadere_console="C:/Daten/Repos/vadere/VadereGui/target/vadere-console.jar", scenario_timeout_in_sec=60):
output_dir = "output" output_dir = "output"
if not os.path.exists(output_dir): if not os.path.exists(output_dir):
...@@ -75,7 +75,7 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader ...@@ -75,7 +75,7 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader
passed_scenarios.append(scenario_file) passed_scenarios.append(scenario_file)
except subprocess.TimeoutExpired as exception: except subprocess.TimeoutExpired as exception:
prefix = "" prefix = ""
if scenario_file.find("TestOSM"): if "TestOSM" in scenario_file:
prefix = " * OSM * " prefix = " * OSM * "
print(prefix +"Scenario file failed: {}".format(scenario_file)) print(prefix +"Scenario file failed: {}".format(scenario_file))
...@@ -83,8 +83,8 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader ...@@ -83,8 +83,8 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader
failed_scenarios_with_exception.append((scenario_file, exception)) failed_scenarios_with_exception.append((scenario_file, exception))
except subprocess.CalledProcessError as exception: except subprocess.CalledProcessError as exception:
prefix = "" prefix = ""
if scenario_file.find("TestOSM"): if "TestOSM" in scenario_file:
prefix = " * OSM Test *" prefix = " * OSM * "
print(prefix + "Scenario file failed: {}".format(scenario_file)) print(prefix + "Scenario file failed: {}".format(scenario_file))
print("-> Reason: non-zero return value {}".format(exception.returncode)) print("-> Reason: non-zero return value {}".format(exception.returncode))
failed_scenarios_with_exception.append((scenario_file, exception)) failed_scenarios_with_exception.append((scenario_file, exception))
...@@ -105,12 +105,12 @@ if __name__ == "__main__": ...@@ -105,12 +105,12 @@ if __name__ == "__main__":
scenario_do_not_test.extend(scenarios_long) scenario_do_not_test.extend(scenarios_long)
scenario_files_regular_length = find_scenario_files(exclude_patterns=scenario_do_not_test) scenario_files_regular_length = find_scenario_files(exclude_patterns=scenario_do_not_test)
passed_and_failed_scenarios = run_scenario_files_with_vadere_console(scenario_files_regular_length) passed_and_failed_scenarios = run_scenario_files_with_vadere_console(scenario_files_regular_lengt)
for scenario in scenarios_long: for scenario in scenarios_long:
search_pattern = "*" + scenario + "*.scenario" search_pattern = "*" + scenario + "*.scenario"
scenario_files_long = find_scenario_files(scenario_search_pattern=search_pattern) scenario_files_long = find_scenario_files(scenario_search_pattern=search_pattern)
tmp_passed_and_failed_scenarios = run_scenario_files_with_vadere_console(scenario_files_long, scenario_timeout_in_sec=180) tmp_passed_and_failed_scenarios = run_scenario_files_with_vadere_console(scenario_files_long, scenario_timeout_in_sec=240)
passed_and_failed_scenarios["passed"].extend(tmp_passed_and_failed_scenarios["passed"]) passed_and_failed_scenarios["passed"].extend(tmp_passed_and_failed_scenarios["passed"])
passed_and_failed_scenarios["failed"].extend(tmp_passed_and_failed_scenarios["failed"]) passed_and_failed_scenarios["failed"].extend(tmp_passed_and_failed_scenarios["failed"])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment