mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 21:32:26 +00:00
Parse logs for build and test status.
This commit is contained in:
parent
35c3921be4
commit
6470000cff
3 changed files with 63 additions and 13 deletions
14
src/tools/make/checksumtest.sh
Normal file
14
src/tools/make/checksumtest.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# Checksum tests
|
||||||
|
|
||||||
|
md5=$((which md5;which md5sum)2>/dev/null)
|
||||||
|
if [ -f $1 ]
|
||||||
|
then
|
||||||
|
$md5 *.o >newsums
|
||||||
|
if diff -b $1 newsums
|
||||||
|
then printf "\n--- Object file checksums match ---\n"; rm newsums
|
||||||
|
else printf "\n--- Object file checksum mismatch ---\n"; rm newsums; exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
$md5 *.o >$1
|
||||||
|
printf "\n--- Object files checksummed ---\n"
|
||||||
|
fi
|
||||||
|
|
@ -28,6 +28,7 @@ usage:
|
||||||
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
|
@printf "\n\n--- Cleaning branch $$(BRANCH) $(OS) $(COMPILER) $(DATAMODEL) ---\n\n"
|
||||||
rm -rf $(BUILDDIR)
|
rm -rf $(BUILDDIR)
|
||||||
rm -f $(VISHAP)
|
rm -f $(VISHAP)
|
||||||
|
|
||||||
|
|
@ -374,7 +375,7 @@ confidence:
|
||||||
if [ "$(PLATFORM)" != "windows" ] ; then cd src/test/confidence/signal; ./test.sh "$(INSTALLDIR)"; fi
|
if [ "$(PLATFORM)" != "windows" ] ; then cd src/test/confidence/signal; ./test.sh "$(INSTALLDIR)"; fi
|
||||||
cd src/test/confidence/lola; ./test.sh "$(INSTALLDIR)"
|
cd src/test/confidence/lola; ./test.sh "$(INSTALLDIR)"
|
||||||
cd src/test/confidence/arrayassignment; ./test.sh "$(INSTALLDIR)"
|
cd src/test/confidence/arrayassignment; ./test.sh "$(INSTALLDIR)"
|
||||||
@printf "\n\n--- Branch $$(git rev-parse --abbrev-ref HEAD) $(OS) $(COMPILER) $(DATAMODEL) confidence tests passed ---\n\n"
|
@printf "\n\n--- Confidence tests passed ---\n\n"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,15 +5,49 @@ use POSIX "strftime";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
my %status = ();
|
my %status = ();
|
||||||
open(my $logs, "/tmp/buildall.log") // die "Couldn't open combined build log.";
|
|
||||||
while (<$logs>) {
|
|
||||||
if (/^([^ ]+) ([^ ]+) --- Branch ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) confidence tests passed ---/) {
|
sub parselog {
|
||||||
my $key = "$4-$6-$5";
|
my ($fn) = @_;
|
||||||
$status{$key} = [$1, $2, $3, $4, $5, $6];
|
my $date = "";
|
||||||
|
my $time = "";
|
||||||
|
my $branch = "";
|
||||||
|
my $os = "";
|
||||||
|
my $compiler = "";
|
||||||
|
my $datamodel = "";
|
||||||
|
my $compilerok = "";
|
||||||
|
my $libraryok = "";
|
||||||
|
my $checksum = "";
|
||||||
|
my $tests = "";
|
||||||
|
open(my $log, $fn) // die "Couldn't open build log $fn.";
|
||||||
|
while (<$log>) {
|
||||||
|
if (/^([0-9/]+) [0-9.]+ [^ ]+\.log$/) {$date = $1;}
|
||||||
|
if (/^[^ ]+ --- Cleaning branch ([^ ]+) ([^ ]+) ([^ ]+) ([^ ]+) ---$/) {
|
||||||
|
($branch, $os, $compiler, $datamodel) = ($1, $2, $3, $4, $5);
|
||||||
|
}
|
||||||
|
if (/^--- Compiler build successfull ---$/) {$compilerok = "Built";}
|
||||||
|
if (/^--- Library build successfull ---$/) {$libraryok = "Built";}
|
||||||
|
if (/^--- Confidence tests passed ---$/) {$tests = "Passed";}
|
||||||
|
if (/^--- Object file checksums match ---$/) {$checksum = "Match";}
|
||||||
|
if (/^--- Object file checksum mismatch ---$/) {$checksum = "Changed";}
|
||||||
|
if (/^--- Object files checksummed ---$/) {$checksum = "New";}
|
||||||
|
}
|
||||||
|
close($log);
|
||||||
|
my $key = "$os-$compiler-$datamodel";
|
||||||
|
if ($key ne "") {
|
||||||
|
status{$key} = [$date, $time, $os, %compiler, $datamodel, $branch, $compilerok, $libraryok, $checksum, $tests];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
close($logs);
|
|
||||||
|
opendir DIR, "log" // die "Could not openlog directory.";
|
||||||
|
my @logs = readdir DIR;
|
||||||
|
closedir DIR;
|
||||||
|
|
||||||
|
for my $logname (sort @logs) {
|
||||||
|
if (-f $logname) {parselog($logname);}
|
||||||
|
}
|
||||||
|
|
||||||
my $emsperline = 1.2;
|
my $emsperline = 1.2;
|
||||||
|
|
||||||
|
|
@ -49,19 +83,20 @@ svgtext($svg, $col2, 0, "#e0e0e0", "Compiler");
|
||||||
svgtext($svg, $col3, 0, "#e0e0e0", "Data model");
|
svgtext($svg, $col3, 0, "#e0e0e0", "Data model");
|
||||||
svgtext($svg, $col4, 0, "#e0e0e0", "Compiler");
|
svgtext($svg, $col4, 0, "#e0e0e0", "Compiler");
|
||||||
svgtext($svg, $col5, 0, "#e0e0e0", "Library");
|
svgtext($svg, $col5, 0, "#e0e0e0", "Library");
|
||||||
svgtext($svg, $col6, 0, "#e0e0e0", "Cksum");
|
svgtext($svg, $col6, 0, "#e0e0e0", "Checksum");
|
||||||
svgtext($svg, $col7, 0, "#e0e0e0", "Tests");
|
svgtext($svg, $col7, 0, "#e0e0e0", "Tests");
|
||||||
|
|
||||||
my $i=1;
|
my $i=1;
|
||||||
for my $key (sort keys %status) {
|
for my $key (sort keys %status) {
|
||||||
my ($host, $time, $branch, $os, $compiler, $datamodel) = @{$status{$key}};
|
my ($date, $time, $os, %compiler, $datamodel,
|
||||||
|
$branch, $compilerok, $libraryok, $checksum, $tests) = @{$status{$key}};
|
||||||
svgtext($svg, $col1, $i, "#c0c0c0", $os);
|
svgtext($svg, $col1, $i, "#c0c0c0", $os);
|
||||||
svgtext($svg, $col2, $i, "#c0c0c0", $compiler);
|
svgtext($svg, $col2, $i, "#c0c0c0", $compiler);
|
||||||
svgtext($svg, $col3, $i, "#c0c0c0", $datamodel);
|
svgtext($svg, $col3, $i, "#c0c0c0", $datamodel);
|
||||||
svgtext($svg, $col4, $i, "#60ff60", "Pass");
|
svgtext($svg, $col4, $i, "#60ff60", $compilerok);
|
||||||
svgtext($svg, $col5, $i, "#60ff60", "Pass");
|
svgtext($svg, $col5, $i, "#60ff60", $libraryok);
|
||||||
# svgtext($svg, $col6, $i, "#60ff60", "Pass");
|
svgtext($svg, $col6, $i, "#60ff60", $checksum);
|
||||||
svgtext($svg, $col7, $i, "#60ff60", "Pass");
|
svgtext($svg, $col7, $i, "#60ff60", $tests);
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue