Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
projet
VPLPP
Commits
8b63f368
Commit
8b63f368
authored
Jun 23, 2020
by
Guillaume Huard
Browse files
Presentation details (weight and errors)
parent
fdf11a07
Changes
1
Hide whitespace changes
Inline
Side-by-side
Basic_System/ef/vpl_evaluate.pl
View file @
8b63f368
...
...
@@ -484,7 +484,8 @@ sub perform_tests($$) {
my
$weight
=
get_value
(
$test
,
'
weight
',
1
);
$total
+=
$weight
;
my
$indication
=
$test_name
.
((
$weight
>
1
)?"
(weight
"
.
$weight
.
"
)
":"");
my
$indication
=
$test_name
;
$indication
.=
"
(weight
"
.
$weight
.
"
)
"
if
exists
(
$test
->
{
weight
});
my
$result
=
undef
;
my
$details
=
"
Test
$test_name
:
\n
";
# runs setup, if any
...
...
@@ -628,7 +629,7 @@ sub evaluate_file($) {
if
(
-
f
$file
)
{
my
$description
=
read_file
(
$file
)
||
error
("
Cannot read
$file
");
remove
("
$file
")
||
error
("
Unlink of
$file
resulted in $!
");
my
$result
=
eval
$description
||
error
(
$@
);
my
$result
=
eval
$description
||
error
(
"
$file
:
$@
"
);
return
$result
;
}
else
{
return
undef
;
...
...
@@ -646,7 +647,7 @@ debug("VPL_SUBFILES : $ENV{VPL_SUBFILES}\n");
# read local setup and testcases to run
evaluate_file
("
vpl_evaluate_setup.pl
");
my
$test_cases
=
evaluate_file
("
vpl_evaluate.cases
")
||
error
("
Invalid vpl_evaluate.cases
")
;
my
$test_cases
=
evaluate_file
("
vpl_evaluate.cases
");
debug
(
Dumper
(
$test_cases
));
...
...
@@ -666,7 +667,8 @@ foreach my $name (sort(keys(%$test_cases))) {
my
@files
;
my
$weight
=
get_value
(
$case
,
'
case_weight
',
1
);
my
$title
=
"
Test case
$name
"
.
((
$weight
>
1
)?"
(weight
"
.
$weight
.
"
)
":"");
my
$title
=
"
Test case
$name
";
$title
.=
"
(weight
"
.
$weight
.
"
)
"
if
exists
(
$case
->
{
case_weight
});
title
(
$title
);
# Tests
...
...
Write
Preview
Markdown
is supported
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