mirror of https://github.com/CGAL/cgal
Adding a timeout column to the testsuite
This commit is contained in:
parent
a43006e2c1
commit
e585aa3131
|
|
@ -151,7 +151,7 @@ sub collect_results_of_platform($)
|
|||
# Create an anonymous hash that hashes packages to their result.
|
||||
my $platform_results = {};
|
||||
my $test_result="results_${platform}.txt";
|
||||
my ($yeahs, $nays, $warnings,$third_party_warnings,$reqs) = (0,0,0,0,0);
|
||||
my ($yeahs, $nays, $warnings,$third_party_warnings,$timeout,$reqs) = (0,0,0,0,0,0);
|
||||
my $resulttext;
|
||||
open(TESTRESULT, $test_result) or return $platform_results;
|
||||
while (<TESTRESULT>) {
|
||||
|
|
@ -169,6 +169,9 @@ sub collect_results_of_platform($)
|
|||
} elsif ($2 eq 'n' or $2 eq 'N') {
|
||||
$resulttext = 'n';
|
||||
++$nays;
|
||||
} elsif ($2 eq 'o' or $2 eq 'O') {
|
||||
$resulttext = 'o';
|
||||
++$timeout;
|
||||
} elsif ($2 eq 'r') {
|
||||
$resulttext = 'r';
|
||||
++$reqs;
|
||||
|
|
@ -183,6 +186,7 @@ sub collect_results_of_platform($)
|
|||
$platform_results->{"n"} = $nays;
|
||||
$platform_results->{"w"} = $warnings;
|
||||
$platform_results->{"t"} = $third_party_warnings;
|
||||
$platform_results->{"o"} = $timeout;
|
||||
$platform_results->{"r"} = $reqs;
|
||||
return $platform_results;
|
||||
}
|
||||
|
|
@ -260,6 +264,8 @@ EOF
|
|||
print OUTPUT ' class="warning"';
|
||||
} elsif ($resulttext eq 't') {
|
||||
print OUTPUT ' class="third_party_warning"';
|
||||
} elsif ($resulttext eq 'o') {
|
||||
print OUTPUT ' class="timeout"';
|
||||
} elsif ($resulttext eq 'n') {
|
||||
print OUTPUT ' class="error"';
|
||||
} elsif ($resulttext eq 'r') {
|
||||
|
|
@ -461,6 +467,7 @@ sub print_platform_descriptions()
|
|||
<th class="ok">y</th>
|
||||
<th class="third_party_warning">t</th>
|
||||
<th class="warning">w</th>
|
||||
<th class="timeout">o</th>
|
||||
<th class="error">n</th>
|
||||
<th class="requirements">r</th>
|
||||
<th>CMake</th>
|
||||
|
|
@ -500,6 +507,7 @@ EOF
|
|||
my $county = $testresults[$platform_num]->{"y"};
|
||||
my $countt = $testresults[$platform_num]->{"t"};
|
||||
my $countw = $testresults[$platform_num]->{"w"};
|
||||
my $counto = $testresults[$platform_num]->{"o"};
|
||||
my $countn = $testresults[$platform_num]->{"n"};
|
||||
my $countr = $testresults[$platform_num]->{"r"};
|
||||
|
||||
|
|
@ -519,6 +527,7 @@ EOF
|
|||
print OUTPUT "<td>$county</td>\n";
|
||||
print OUTPUT "<td>$countt</td>\n";
|
||||
print OUTPUT "<td>$countw</td>\n";
|
||||
print OUTPUT "<td>$counto</td>\n";
|
||||
print OUTPUT "<td>$countn</td>\n";
|
||||
print OUTPUT "<td>$countr</td>\n";
|
||||
$index = 8;
|
||||
|
|
@ -611,7 +620,7 @@ sub print_little_header(){
|
|||
<a id="jump_to_results" href="#testresults">jump to results</a></h1>
|
||||
<!--#include virtual="versions.inc"-->
|
||||
<p>The results of the tests are presented in a table
|
||||
('y' = success, 'w' = warning, 't' = third party warning 'n' = failure, 'r' = a requirement is not found),
|
||||
('y' = success, 'w' = warning, 't' = third party warning, 'o' = timeout, 'n' = failure, 'r' = a requirement is not found),
|
||||
and the error + compiler output from each test can be retrieved by clicking
|
||||
on it.</p>
|
||||
<p><b>N.B. The detection of warnings is not exact.
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ TD.os64bits {font-style:italic}
|
|||
TD.ok {background-color: rgb(44%,88%,44%)}
|
||||
TD.warning {background-color: rgb(100%,100%,50%)}
|
||||
TD.third_party_warning {background-color: rgb(75%,100%,50%)}
|
||||
TD.timeout {background-color: rgb(100%,75%,25%)}
|
||||
TD.error {background-color: rgb(100%,50%,50%)}
|
||||
TD.na {background-color: white;}
|
||||
TD.requirements { background-color: rgb(65%,65%,100%) }
|
||||
|
|
@ -35,6 +36,7 @@ TD.requirements { background-color: rgb(65%,65%,100%) }
|
|||
TH.ok {background-color: rgb(44%,88%,44%)}
|
||||
TH.warning {background-color: rgb(100%,100%,50%)}
|
||||
TH.third_party_warning {background-color: rgb(75%,100%,50%)}
|
||||
TH.timeout {background-color: rgb(100%,75%,25%)}
|
||||
TH.error {background-color: rgb(100%,50%,50%)}
|
||||
TH.requirements { background-color: rgb(65%,65%,100%) }
|
||||
|
||||
|
|
@ -50,6 +52,10 @@ TD.third_party_warning A {font-size:large; text-decoration: none}
|
|||
TD.third_party_warning A:link {color: rgb(0%,0%,100%)}
|
||||
TD.third_party_warning A:visited {color: rgb(80%,80%,100%)}
|
||||
|
||||
TD.timeout A {font-size:large; text-decoration: none}
|
||||
TD.timeout A:link {color: rgb(0%,0%,100%)}
|
||||
TD.timeout A:visited {color: rgb(80%,80%,100%)}
|
||||
|
||||
TD.error A {font-size: large; text-decoration: none}
|
||||
TD.error A:link {color: rgb(0%,0%,100%)}
|
||||
TD.error A:visited {color: rgb(80%,0%,100%)}
|
||||
|
|
|
|||
|
|
@ -83,12 +83,15 @@ with open_file_create_dir(result_file_name.format(dir=os.getcwd(),
|
|||
tester=tester_name,
|
||||
platform=platform_name), 'a+') as results:
|
||||
for label, tests in tests_per_label.items():
|
||||
counts={"n": 0, "w": 0, "t": 0}
|
||||
counts={"n": 0, "w": 0, "t": 0, "o": 0}
|
||||
result_for_label='y'
|
||||
with open_file_create_dir("{}/error.txt".format(label), 'w') as error:
|
||||
for t in tests:
|
||||
print(" {result} {name} in {time} s : {value} ".format(result = "successful " if (t['Status'] == 'passed') else "ERROR: ", name = t['Name'], value = t['ExitValue'] if(t['ExitValue'] != "") else "SUCCESS" , time = t['ExecutionTime']), file=error)
|
||||
if t['Status'] != 'passed':
|
||||
if t['ExitValue'] == "Timeout":
|
||||
counts["o"]+=1
|
||||
else:
|
||||
counts["n"]+=1
|
||||
elif t['Output'] != None and w_det.search(t['Output']):
|
||||
entries = re.split("\n+", t['Output'])
|
||||
|
|
@ -108,6 +111,8 @@ with open_file_create_dir(result_file_name.format(dir=os.getcwd(),
|
|||
|
||||
if counts["n"] > 0:
|
||||
result_for_label='n'
|
||||
elif counts["o"] > 0:
|
||||
result_for_label='o'
|
||||
elif counts["w"] > 0:
|
||||
result_for_label='w'
|
||||
elif counts["t"] > 0:
|
||||
|
|
|
|||
Loading…
Reference in New Issue