Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
9.2.2023: Due to updates GitLab will be unavailable for some minutes between 9:00 and 11:00.
Open sidebar
vadere
vadere
Commits
184bdd82
Commit
184bdd82
authored
Nov 21, 2018
by
Stefan Schuhbaeck
Browse files
add summary to CI-run. Activate all CI runs
parent
c98d2280
Pipeline
#76226
canceled with stages
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
184bdd82
...
...
@@ -46,16 +46,6 @@ unit_tests_with_coverage:
-
mvn -Dtest=!TestConvolution,!TestBitonicSort,!TestCLLinkedList,!TestCLOptimalStepsModel test
-
python3 Tools/ContinuousIntegration/collect_line_and_branch_coverage.py
# run_scenario_files:
# stage: deploy
# script:
# - Documentation/version-control/git-hook-vadere-software
# - mvn clean
# - mvn -Dmaven.test.skip=true package
# - python3 Tools/ContinuousIntegration/run_vadere_console_with_all_scenario_files.py
#
run_origin_test
:
stage
:
deploy
...
...
@@ -75,3 +65,12 @@ run_seed_test:
-
mvn -Dmaven.test.skip=true package
-
python3 Tools/VadereAnalysisTool/setup.py install --user
-
python3 Tools/ContinuousIntegration/run_seed_comparison_test.py
run_scenario_files
:
stage
:
deploy
script
:
-
Documentation/version-control/git-hook-vadere-software
-
mvn clean
-
mvn -Dmaven.test.skip=true package
-
python3 Tools/ContinuousIntegration/run_vadere_console_with_all_scenario_files.py
\ No newline at end of file
Tools/ContinuousIntegration/install_vadere_analysis_tool.py
deleted
100644 → 0
View file @
c98d2280
import
getpass
import
os
import
re
import
subprocess
import
shutil
def
install_package_if_needed
(
package_name
=
'VadereAnalysisTool'
,
search_path
=
'Tools/VadereAnalysisTool'
):
try
:
make_package_cwd
=
os
.
path
.
abspath
(
search_path
)
if
os
.
path
.
exists
(
os
.
path
.
join
(
search_path
,
"dist"
)):
shutil
.
rmtree
(
os
.
path
.
join
(
search_path
,
"dist"
))
print
(
"Build package {}..."
.
format
(
package_name
))
p_make_package
=
subprocess
.
run
(
args
=
[
"python3"
,
"setup.py"
,
"bdist_wheel"
],
cwd
=
make_package_cwd
,
timeout
=
10
,
check
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
if
p_make_package
.
stdout
:
print
(
"StdOut: {}"
.
format
(
p_make_package
.
stdout
.
decode
(
'utf8'
)))
if
p_make_package
.
stderr
:
print
(
"StdErr: {}"
.
format
(
p_make_package
.
stderr
.
decode
(
'utf8'
)))
print
(
"ReturnCode: {}"
.
format
(
p_make_package
.
returncode
))
if
p_make_package
.
returncode
==
0
:
stdout
=
p_make_package
.
stdout
.
decode
(
'utf8'
)
dist_dir
=
os
.
path
.
join
(
search_path
,
"dist"
)
wheel_files
=
[
f
for
f
in
os
.
listdir
(
dist_dir
)
if
f
.
endswith
(
".whl"
)]
if
len
(
wheel_files
)
>
0
:
dist_path
=
os
.
path
.
join
(
search_path
,
"dist"
,
wheel_files
[
0
])
user
=
getpass
.
getuser
()
print
(
"
\n
Install package {} locally for user {} ..."
.
format
(
dist_path
,
user
))
p_install_package
=
subprocess
.
run
(
args
=
[
"python3"
,
"-m"
,
"pip"
,
"install"
,
"--user"
,
dist_path
],
timeout
=
10
,
check
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
if
p_install_package
.
stdout
:
print
(
"StdOut: {}"
.
format
(
p_install_package
.
stdout
.
decode
(
'utf8'
)))
if
p_install_package
.
stderr
:
print
(
"StdErr: {}"
.
format
(
p_install_package
.
stderr
.
decode
(
'utf8'
)))
print
(
"ReturnCode: {}"
.
format
(
p_install_package
.
returncode
))
else
:
exit
(
1
)
else
:
exit
(
1
)
except
subprocess
.
TimeoutExpired
as
exception
:
print
(
"Timeout installing {} from path {}"
.
format
(
package_name
,
search_path
))
except
subprocess
.
CalledProcessError
as
exception
:
print
(
"Error installing {} from path {}
\n
err:{}"
.
format
(
package_name
,
search_path
,
exception
.
stderr
))
if
__name__
==
'__main__'
:
install_package_if_needed
()
Tools/ContinuousIntegration/run_orign_translation_test.py
View file @
184bdd82
...
...
@@ -90,14 +90,19 @@ if __name__ == '__main__':
output_pairs
=
get_output_pairs
()
print
(
"comparing {} output pairs"
.
format
(
len
(
output_pairs
)))
results
=
[
pair
.
get_origin_deviation_result
()
for
pair
in
output_pairs
]
#
results = [pair.get_origin_deviation_result() for pair in output_pairs]
return_val
=
0
space_offset
=
''
all_results_count
=
len
(
output_pairs
)
err_results_count
=
0
warn_results_count
=
0
ok_results_coutn
=
0
for
pair
in
output_pairs
:
result
=
pair
.
get_origin_deviation_result
()
print
(
"*** compare trajectories for {} ... "
.
format
(
result
[
'output_name'
]),
end
=
''
)
if
result
[
'err_count'
]
>
0
:
err_results_count
+=
1
print
(
"ERROR"
)
return_val
=
1
print
(
" Error: Found {} pedestrians with maximal diff bigger than {}."
.
format
(
result
[
'err_count'
],
...
...
@@ -111,6 +116,7 @@ if __name__ == '__main__':
if
result
[
'warn_count'
]
>
0
:
if
result
[
'err_count'
]
==
0
:
warn_results_count
+=
1
print
(
"WARN"
)
print
(
" Warning: Found {} pedestrians with maximal diff between {} and {}."
.
format
(
result
[
'warn_count'
],
pair
.
max_diff_ok
,
...
...
@@ -123,6 +129,7 @@ if __name__ == '__main__':
print
(
" [{}, {}, {}]"
.
format
(
row
[
'pedestrianId'
],
row
[
'timeStep'
],
row
[
'diff'
]))
if
result
[
'err_count'
]
==
0
and
result
[
'warn_count'
]
==
0
:
ok_results_coutn
+=
1
print
(
"OK"
)
if
result
[
'err_count'
]
>
0
or
result
[
'warn_count'
]
>
0
:
...
...
@@ -139,5 +146,12 @@ if __name__ == '__main__':
))
pair
.
get_figure
([
p
.
get_origin_deviation_result
()
for
p
in
output_pairs
]).
show
()
print
(
"###########"
)
print
(
"# Summary #"
)
print
(
"###########"
)
print
(
""
)
print
(
"Total scenario runs: {}"
.
format
(
all_results_count
))
print
(
"Passed: {}"
.
format
(
ok_results_coutn
))
print
(
"Warning: {}"
.
format
(
warn_results_count
))
print
(
"Failed: {}"
.
format
(
err_results_count
))
exit
(
return_val
)
Tools/ContinuousIntegration/run_seed_comparison_test.py
View file @
184bdd82
...
...
@@ -25,8 +25,6 @@ def run_scenario_files_with_vadere_console(project, number_of_runs=3, vadere_con
# Measure wall time and not CPU time simply because it is the simplest method.
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).
# print("subprocess call: {}".format(' '.join(
...
...
@@ -78,3 +76,12 @@ if __name__ == '__main__':
if
seed_ok
:
for
res
in
seed_ok
:
print
(
"Scenario {} with scenario-hash {} - OK"
.
format
(
res
[
'scenario_name'
],
res
[
'scenario_hash'
]))
print
(
"###########"
)
print
(
"# Summary #"
)
print
(
"###########"
)
print
(
""
)
print
(
"Total scenario runs: {}"
.
format
(
len
(
seed_results
)))
print
(
"Passed: {}"
.
format
(
len
(
seed_ok
)))
print
(
"Failed: {}"
.
format
(
len
(
seed_err
)))
\ No newline at end of file
Tools/VadereAnalysisTool/setup.py
View file @
184bdd82
...
...
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
setuptools
.
setup
(
name
=
"VadereAnalysisTool"
,
version
=
"0.
0.9
"
,
version
=
"0.
1.0
"
,
author
=
"Stefan Schuhbäck"
,
author_email
=
"stefan.schuhbaeck@hm.edu"
,
description
=
"Import VadereProject to ease analysis"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment