Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sedrubal
Masterarbeit
evaluation_tools
Commits
63580e28
Verified
Commit
63580e28
authored
Sep 27, 2021
by
Sebastian Endres
Browse files
plot_all: Skip plots, when they could not be parsed before
parent
be8b1efc
Changes
1
Hide whitespace changes
Inline
Side-by-side
plot_all.py
View file @
63580e28
...
...
@@ -120,7 +120,7 @@ class PlotAllCli:
if
not
measurement_result
.
succeeded
and
not
self
.
include_failed
:
cprint
(
(
"
⚒
Measurement "
"
✔
Measurement "
f
"
{
measurement_result
.
log_dir_for_test
.
relative_to
(
self
.
_current_log_dir
)
}
"
"Failed. Skipping. Use --include-failed to include it anyway."
),
...
...
@@ -180,21 +180,45 @@ class PlotAllCli:
rets
=
list
[
str
]()
for
mode
in
modes
:
output_file
=
Path
(
test_case_dir
/
f
"time_
{
mode
.
value
}
_plot.
{
self
.
format
}
"
)
output_file
=
test_case_dir
/
f
"time_
{
mode
.
value
}
_plot.
{
self
.
format
}
"
err_output_file
=
test_case_dir
/
f
"time_
{
mode
.
value
}
_plot_error.txt"
if
not
self
.
force
:
if
output_file
.
is_file
():
cprint
(
(
f
"✔
{
output_file
.
relative_to
(
self
.
_current_log_dir
)
}
already exists. "
"Skipping. Use --force to overwrite."
),
file
=
sys
.
stderr
,
color
=
"cyan"
,
)
if
not
self
.
force
and
output_file
.
is_file
():
cprint
(
(
f
"⚒
{
output_file
.
relative_to
(
self
.
_current_log_dir
)
}
already exists. "
"Skipping. Use --force to overwrite."
),
file
=
sys
.
stderr
,
color
=
"cyan"
,
)
rets
.
append
(
"already exists"
)
rets
.
append
(
"already exists"
)
continue
elif
err_output_file
.
is_file
():
with
err_output_file
.
open
(
"r"
)
as
file
:
err_msg
=
file
.
read
().
strip
()
continue
cprint
(
(
"⨯ Trace could not be plotted in previous run. "
f
"
{
err_output_file
.
relative_to
(
self
.
_current_log_dir
)
}
exists: "
),
file
=
sys
.
stderr
,
color
=
"red"
,
)
cprint
(
err_msg
,
file
=
sys
.
stderr
,
color
=
"red"
)
cprint
(
"Skipping. Use --force to overwrite."
,
file
=
sys
.
stderr
,
color
=
"red"
,
)
rets
.
append
(
err_msg
)
continue
cprint
(
(
...
...
@@ -230,6 +254,9 @@ class PlotAllCli:
)
cprint
(
f
"⨯
{
err
}
"
,
file
=
sys
.
stderr
,
color
=
"red"
)
with
err_output_file
.
open
(
"w"
)
as
file
:
print
(
err
,
file
=
file
)
rets
.
append
(
str
(
err
))
continue
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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