mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-05 23:22:25 +00:00
Use source diff to identify compiler changes.
This commit is contained in:
parent
9ad2a86827
commit
b445d95772
4 changed files with 61 additions and 23 deletions
5
makefile
5
makefile
|
|
@ -135,6 +135,7 @@ full: configuration
|
|||
@make -f src/tools/make/vishap.make -s installable
|
||||
@make -f src/tools/make/vishap.make -s clean
|
||||
# Make bootstrap compiler from source suitable for current data model
|
||||
@printf "\n\n--- Compiler build started ---\n\n"
|
||||
@make -f src/tools/make/vishap.make -s compilerfromsavedsource
|
||||
# Use bootstrap compiler to make compiler binary from latest compiler sources
|
||||
@make -f src/tools/make/vishap.make -s translate
|
||||
|
|
@ -144,10 +145,12 @@ full: configuration
|
|||
@make -f src/tools/make/vishap.make -s assemble
|
||||
@printf "\n\n--- Compiler build successfull ---\n\n"
|
||||
@make -f src/tools/make/vishap.make -s browsercmd
|
||||
@printf "\n\n--- Library build started ---\n\n"
|
||||
@make -f src/tools/make/vishap.make -s library
|
||||
@printf "\n\n--- Library build successfull ---\n\n"
|
||||
@make -f src/tools/make/vishap.make -s checksum
|
||||
@make -f src/tools/make/vishap.make -s sourcechanges
|
||||
@make -f src/tools/make/vishap.make -s install
|
||||
@printf "\n\n--- Confidence tests started ---\n\n"
|
||||
@make -f src/tools/make/vishap.make -s confidence
|
||||
@make -f src/tools/make/vishap.make -s showpath
|
||||
|
||||
|
|
|
|||
|
|
@ -12,33 +12,35 @@ my %status = ();
|
|||
sub parselog {
|
||||
my ($fn) = @_;
|
||||
#print "Parsing log $fn\n";
|
||||
my $date = "";
|
||||
my $time = "";
|
||||
my $branch = "";
|
||||
my $os = "";
|
||||
my $compiler = "";
|
||||
my $datamodel = "";
|
||||
my $compilerok = "";
|
||||
my $libraryok = "";
|
||||
my $checksum = "";
|
||||
my $tests = "";
|
||||
my $date = "";
|
||||
my $time = "";
|
||||
my $branch = "";
|
||||
my $os = "";
|
||||
my $compiler = "";
|
||||
my $datamodel = "";
|
||||
my $compilerok = "";
|
||||
my $libraryok = "";
|
||||
my $sourcechange = "";
|
||||
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 (/^([0-9.]+) --- Compiler build successfull ---$/) {$compilerok = "Built";}
|
||||
if (/^([0-9.]+) --- Library build successfull ---$/) {$libraryok = "Built";}
|
||||
if (/^([0-9.]+) --- Confidence tests passed ---$/) {$tests = "Passed";}
|
||||
if (/^([0-9.]+) --- Object file checksums match ---$/) {$checksum = "Match";}
|
||||
if (/^([0-9.]+) --- Object file checksum mismatch ---$/) {$checksum = "Changed";}
|
||||
if (/^([0-9.]+) --- Object files checksummed ---$/) {$checksum = "New";}
|
||||
if (/^([0-9.]+) --- Compiler build started ---$/) {$compilerok = "Started";}
|
||||
if (/^([0-9.]+) --- Compiler build successfull ---$/) {$compilerok = "Built";}
|
||||
if (/^([0-9.]+) --- Library build started ---$/) {$libraryok = "Started";}
|
||||
if (/^([0-9.]+) --- Library build successfull ---$/) {$libraryok = "Built";}
|
||||
if (/^([0-9.]+) --- Generated c source files match bootstrap ---$/) {$sourcechange = "Unchanged";}
|
||||
if (/^([0-9.]+) --- Generated c source files differ from bootstrap ---$/) {$sourcechange = "Changed";}
|
||||
if (/^([0-9.]+) --- Confidence tests started ---$/) {$tests = "Started";}
|
||||
if (/^([0-9.]+) --- Confidence tests passed ---$/) {$tests = "Passed";}
|
||||
}
|
||||
close($log);
|
||||
my $key = "$os-$compiler-$datamodel";
|
||||
if ($key ne "") {
|
||||
$status{$key} = [$date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok, $checksum, $tests];
|
||||
$status{$key} = [$date, $time, $os, $compiler, $datamodel, $branch, $compilerok, $libraryok, $sourcechange, $tests];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -86,19 +88,19 @@ svgtext($svg, $col2, 0, "#e0e0e0", "Compiler");
|
|||
svgtext($svg, $col3, 0, "#e0e0e0", "Data model");
|
||||
svgtext($svg, $col4, 0, "#e0e0e0", "Compiler");
|
||||
svgtext($svg, $col5, 0, "#e0e0e0", "Library");
|
||||
svgtext($svg, $col6, 0, "#e0e0e0", "Checksum");
|
||||
svgtext($svg, $col6, 0, "#e0e0e0", "C Source");
|
||||
svgtext($svg, $col7, 0, "#e0e0e0", "Tests");
|
||||
|
||||
my $i=1;
|
||||
for my $key (sort keys %status) {
|
||||
my ($date, $time, $os, $compiler, $datamodel,
|
||||
$branch, $compilerok, $libraryok, $checksum, $tests) = @{$status{$key}};
|
||||
$branch, $compilerok, $libraryok, $sourcechange, $tests) = @{$status{$key}};
|
||||
svgtext($svg, $col1, $i, "#c0c0c0", $os);
|
||||
svgtext($svg, $col2, $i, "#c0c0c0", $compiler);
|
||||
svgtext($svg, $col3, $i, "#c0c0c0", $datamodel);
|
||||
svgtext($svg, $col4, $i, "#60ff60", $compilerok);
|
||||
svgtext($svg, $col5, $i, "#60ff60", $libraryok);
|
||||
svgtext($svg, $col6, $i, "#60ff60", $checksum);
|
||||
svgtext($svg, $col6, $i, "#60ff60", $sourcechange);
|
||||
svgtext($svg, $col7, $i, "#60ff60", $tests);
|
||||
$i++;
|
||||
}
|
||||
|
|
|
|||
33
src/tools/make/sourcechanges.sh
Normal file
33
src/tools/make/sourcechanges.sh
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Source change tests.
|
||||
#
|
||||
# Compares compiler source files against the appropriate bootstrap source.
|
||||
# The voc compiler version comment line is skipped.
|
||||
#
|
||||
# Parameters
|
||||
#
|
||||
# $1 - bootstrap directory
|
||||
#
|
||||
# Assumptions
|
||||
#
|
||||
# The current directory is the build directory
|
||||
|
||||
changes="0"
|
||||
for f in $1/*; do
|
||||
fn=$(basename $f)
|
||||
egrep -v "^/\* voc " $f >$fn.old
|
||||
egrep -v "^/\* voc " $fn >$fn.new
|
||||
if ! diff --tabsize=2 -U 2 -b $fn.old $fn.new >$fn.diff; then
|
||||
echo ""
|
||||
echo ""
|
||||
cat $fn.diff
|
||||
changes=1;
|
||||
fi
|
||||
rm -f $fn.old $fn.new $fn.diff
|
||||
done
|
||||
echo ""
|
||||
if [ $changes == "0" ]; then
|
||||
echo "--- Generated c source files match bootstrap ---"
|
||||
else
|
||||
echo "--- Generated c source files differ from bootstrap ---"
|
||||
fi
|
||||
echo ""
|
||||
|
|
@ -363,8 +363,8 @@ library: v4 ooc2 ooc ulm pow32 misc s3 librarybinary
|
|||
|
||||
|
||||
|
||||
checksum:
|
||||
@cd $(BUILDDIR) && sh $(ROOTDIR)/src/tools/make/checksumtest.sh $(ROOTDIR)/$(BUILDDIR).$(BRANCH).md5
|
||||
sourcechanges:
|
||||
@cd $(BUILDDIR) && sh $(ROOTDIR)/src/tools/make/sourcechanges.sh $(ROOTDIR)/bootstrap/$(PLATFORM)-$(ADRSIZE)$(ALIGNMENT)
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue