Commit 8b63f368 authored by Guillaume Huard's avatar Guillaume Huard
Browse files

Presentation details (weight and errors)

parent fdf11a07
......@@ -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
......
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