Commit e3c08bfb authored by Benedikt Zoennchen's avatar Benedikt Zoennchen

Merge branch 'develop' of into develop

parents 4ddf575d 9c1c6465
Pipeline #62377 failed with stages
in 1 minute and 24 seconds
......@@ -30,3 +30,12 @@ unit_tests_with_coverage:
- mvn clean
- mvn test -Dtest=!TestConvolution,!TestBitonicSort,!TestCLLinkedList
- python3 Tools/
stage: deploy
- mvn clean
- mvn package
- python3 Tools/
# Use "vadere-console.jar", which is created by "mvn package", to run all
# scenario files under "VadereModelTests" subdirectory.
# Note: script contains some print statements so that progress can be tracked
# a little bit
# Wach out: call this script from root directory of project. E.g.
# python Tools/
import fnmatch
import os
import shutil
import subprocess
def find_scenario_files(path="VadereModelTests"):
scenario_search_pattern = "*.scenario"
scenario_files = []
for root, dirnames, filenames in os.walk(path):
for filename in fnmatch.filter(filenames, scenario_search_pattern):
scenario_path = os.path.join(root, filename)
print("Total scenario files: {}".format(len(scenario_files)))
return scenario_files
def run_scenario_files_with_vadere_console(scenario_files, vadere_console="VadereGui/target/vadere-console.jar", scenario_timeout_in_sec=60):
output_dir = "output"
if not os.path.exists(output_dir):
print("Creating output directory: {}".format(output_dir))
print("Created output directory: {}".format(output_dir))
for scenario_file in scenario_files:
print("Running scenario file: {}".format(scenario_file))
# Use timout feature, check return value and capture stdout/stderr to a PIPE (use completed_process.stdout to get it).
completed_process =["java", "-jar", vadere_console, scenario_file, output_dir],
print("Finished scenario file: {}".format(scenario_file))
if os.path.exists(output_dir):
print("Deleting output directory: {}".format(output_dir))
print("Deleted output directory: {}".format(output_dir))
if __name__ == "__main__":
scenario_files = find_scenario_files()
......@@ -69,8 +69,9 @@ public class VadereConsole {
new ScenarioRun(scenario, null).run();
} catch (IOException e) {
} catch (Exception e) {
......@@ -153,12 +153,14 @@ public class TestCLLinkedList {
int cellStart = gridCells.cellStarts[cell];
int cellEnd = gridCells.cellEnds[cell];
for(int i = cellStart; i < cellEnd; i++) {
VPoint point = new VPoint(gridCells.reorderedPositions[i*2], gridCells.reorderedPositions[i*2+1]);
int[] gridPosition = getGridPosition(point, clUniformHashedGrid.getCellSize(), clUniformHashedGrid.getWorldOrign());
int gridHash = getGridHash(gridPosition, clUniformHashedGrid.getGridSize());
assertEquals(gridHash, cell);
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