The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated 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:

Commit 6c32a6fc authored by Marion Goedel's avatar Marion Goedel
Browse files

Update of CI script:

- More time (180 s) for Rimea 9 and 11 tests (since they have more pedestrians)
- No output if a simulation is successful -> in the email we will hopefully see only the ones that failed now
- Excludes files from directories "output" and "legacy" for the location application
parent 41e5b6a2
Pipeline #65880 failed with stages
in 34 minutes and 35 seconds
......@@ -15,21 +15,23 @@ import shutil
import subprocess
import time
def find_scenario_files(path="VadereModelTests"):
scenario_search_pattern = "*.scenario"
# 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"]):
scenario_files = []
exclude_patterns = ["TESTOVM"]
for root, dirnames, filenames in os.walk(path):
for filename in fnmatch.filter(filenames, scenario_search_pattern):
scenario_path = os.path.join(root, filename)
bool_exclude = False
for exclude_pattern in exclude_patterns:
regex_pattern = re.compile(exclude_pattern)
match =
if match:
bool_exclude = True
if match is None:
if not(bool_exclude):
print("Total scenario files: {}".format(len(scenario_files)))
print("Exclude patterns: {}".format(exclude_patterns))
......@@ -54,6 +56,7 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader
# Measure wall time and not cpu because it is the easiest.
wall_time_start = time.time()
# Use timout feature, check return value and capture stdout/stderr to a PIPE (use completed_process.stdout to get it).
completed_process =["java", "-enableassertions", "-jar", vadere_console, "scenario-run", "-f", scenario_file, "-o", output_dir],
......@@ -74,16 +77,29 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader
except subprocess.CalledProcessError as exception:
print("Scenario file failed: {}".format(scenario_file))
print("-> Reason: non-zero return value {} ({})".format(exception.returncode, exception.cmd))
failed_scenarios_with_exception.append((scenario_file, exception))
if os.path.exists(output_dir):
return {"passed": passed_scenarios, "failed": failed_scenarios_with_exception}
if __name__ == "__main__":
scenario_files = find_scenario_files()
passed_and_failed_scenarios = run_scenario_files_with_vadere_console(scenario_files)
scenarios_long = ["rimea_09", "rimea_11", "queueing"]
scenario_do_not_test = ["TESTOVM","output","legacy", "basic_4_1_wall_gnm1"]
scenario_files_regular_length = find_scenario_files(exclude_patterns=scenarios_long)
# passed_and_failed_scenarios = run_scenario_files_with_vadere_console(scenario_files_regular_length)
for scenario in scenarios_long:
search_pattern = "*" + scenario + "*.scenario"
scenario_files_long = find_scenario_files(scenario_search_pattern=search_pattern)
passed_and_failed_scenarios = run_scenario_files_with_vadere_console(scenario_files_long, scenario_timeout_in_sec=240)
if len(passed_and_failed_scenarios["failed"]) > 0:
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