Commit 98db5d98 authored by Stefan Schuhbaeck's avatar Stefan Schuhbaeck
Browse files

add assertion text. add artifact

parent b50befdd
Pipeline #77787 failed with stages
in 107 minutes and 34 seconds
...@@ -46,17 +46,20 @@ unit_tests_with_coverage: ...@@ -46,17 +46,20 @@ unit_tests_with_coverage:
- mvn -Dtest=!TestConvolution,!TestBitonicSort,!TestCLLinkedList,!TestCLOptimalStepsModel test - mvn -Dtest=!TestConvolution,!TestBitonicSort,!TestCLLinkedList,!TestCLOptimalStepsModel test
- python3 Tools/ContinuousIntegration/collect_line_and_branch_coverage.py - python3 Tools/ContinuousIntegration/collect_line_and_branch_coverage.py
run_origin_test: run_scenario_files:
stage: deploy stage: deploy
script: script:
- Documentation/version-control/git-hook-vadere-software - Documentation/version-control/git-hook-vadere-software
- mvn clean - mvn clean
- mvn -Dmaven.test.skip=true package - mvn -Dmaven.test.skip=true package
- python3 Tools/VadereAnalysisTools/VadereAnalysisTool/setup.py install --user - python3 Tools/ContinuousIntegration/run_vadere_console_with_all_scenario_files.py
- python3 Tools/ContinuousIntegration/run_orign_translation_test.py artifacts:
paths:
- "log_dir"
expire_in: 1 week
run_seed_test: run_origin_test:
stage: deploy stage: deploy
script: script:
...@@ -64,13 +67,15 @@ run_seed_test: ...@@ -64,13 +67,15 @@ run_seed_test:
- mvn clean - mvn clean
- mvn -Dmaven.test.skip=true package - mvn -Dmaven.test.skip=true package
- python3 Tools/VadereAnalysisTools/VadereAnalysisTool/setup.py install --user - python3 Tools/VadereAnalysisTools/VadereAnalysisTool/setup.py install --user
- python3 Tools/ContinuousIntegration/run_seed_comparison_test.py - python3 Tools/ContinuousIntegration/run_orign_translation_test.py
run_scenario_files: run_seed_test:
stage: deploy stage: deploy
script: script:
- Documentation/version-control/git-hook-vadere-software - Documentation/version-control/git-hook-vadere-software
- mvn clean - mvn clean
- mvn -Dmaven.test.skip=true package - mvn -Dmaven.test.skip=true package
- python3 Tools/ContinuousIntegration/run_vadere_console_with_all_scenario_files.py - python3 Tools/VadereAnalysisTools/VadereAnalysisTool/setup.py install --user
\ No newline at end of file - python3 Tools/ContinuousIntegration/run_seed_comparison_test.py
...@@ -38,10 +38,14 @@ def find_scenario_files(path="VadereModelTests", scenario_search_pattern = "*.sc ...@@ -38,10 +38,14 @@ def find_scenario_files(path="VadereModelTests", scenario_search_pattern = "*.sc
def run_scenario_files_with_vadere_console(scenario_files, vadere_console="VadereSimulator/target/vadere-console.jar", scenario_timeout_in_sec=60): def run_scenario_files_with_vadere_console(scenario_files, vadere_console="VadereSimulator/target/vadere-console.jar", scenario_timeout_in_sec=60):
output_dir = "output" output_dir = "output"
log_dir = "log_dir"
if not os.path.exists(output_dir): if not os.path.exists(output_dir):
os.makedirs(output_dir) os.makedirs(output_dir)
if not os.path.exists(log_dir):
os.makedirs(log_dir)
total_scenario_files = len(scenario_files) total_scenario_files = len(scenario_files)
passed_scenarios = [] passed_scenarios = []
...@@ -53,7 +57,7 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader ...@@ -53,7 +57,7 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader
try: try:
print("Running scenario file ({}/{}): {}".format(i + 1, total_scenario_files, scenario_file)) print("Running scenario file ({}/{}): {}".format(i + 1, total_scenario_files, scenario_file))
scenario_name = os.path.basename(scenario_file).split('.')[0] scenario_name = os.path.basename(scenario_file).split('.')[0]
log_file = os.path.join(scenario_name + ".log") log_file = os.path.join(log_dir, scenario_name + ".log")
# Measure wall time and not CPU time simply because it is the simplest method. # Measure wall time and not CPU time simply because it is the simplest method.
wall_time_start = time.time() wall_time_start = time.time()
...@@ -77,6 +81,8 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader ...@@ -77,6 +81,8 @@ def run_scenario_files_with_vadere_console(scenario_files, vadere_console="Vader
except subprocess.TimeoutExpired as exception: except subprocess.TimeoutExpired as exception:
print("Scenario file failed: {}".format(scenario_file)) print("Scenario file failed: {}".format(scenario_file))
print("-> Reason: timeout after {} s".format(exception.timeout)) print("-> Reason: timeout after {} s".format(exception.timeout))
failed_summary.append("Scenario file failed: {}".format(scenario_file))
failed_summary.append("-> Reason: timeout after {} s".format(exception.timeout))
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 = ""
...@@ -112,7 +118,7 @@ def print_summary(passed_and_failed_scenarios): ...@@ -112,7 +118,7 @@ def print_summary(passed_and_failed_scenarios):
if len(faild_summary) > 0: if len(faild_summary) > 0:
print("#################") print("#################")
print("# Faild Summary #") print("# Failed Summary #")
print("#################") print("#################")
for line in faild_summary: for line in faild_summary:
print(line) print(line)
...@@ -126,6 +132,7 @@ def print_summary(passed_and_failed_scenarios): ...@@ -126,6 +132,7 @@ def print_summary(passed_and_failed_scenarios):
print("Passed: {}".format(total_passed_scenarios)) print("Passed: {}".format(total_passed_scenarios))
print("Failed: {}".format(total_failed_scenarios)) print("Failed: {}".format(total_failed_scenarios))
def run_all(): def run_all():
long_running_scenarios = [ long_running_scenarios = [
"basic_4_1_wall_gnm1", "basic_4_1_wall_gnm1",
...@@ -136,6 +143,7 @@ def run_all(): ...@@ -136,6 +143,7 @@ def run_all():
"thin_wall_and_closer_source_nelder_mead_ok", "thin_wall_and_closer_source_nelder_mead_ok",
"thin_wall_and_closer_source_pso_could_fail", "thin_wall_and_closer_source_pso_could_fail",
"rimea_04_flow_osm1_550_up", "rimea_04_flow_osm1_550_up",
"stairs_diagonal_both_1_2_+1.scenario",
] ]
excluded_scenarios = ["TESTOVM", "output", "legacy"] excluded_scenarios = ["TESTOVM", "output", "legacy"]
......
...@@ -211,7 +211,7 @@ public class Simulation { ...@@ -211,7 +211,7 @@ public class Simulation {
c.preUpdate(simTimeInSec); c.preUpdate(simTimeInSec);
} }
assert assertAllPedestrianInBounds(); assert assertAllPedestrianInBounds(): "Pedestrians are outside of topography bound.";
updateCallbacks(simTimeInSec); updateCallbacks(simTimeInSec);
updateWriters(simTimeInSec); updateWriters(simTimeInSec);
......
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