mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 08:42:24 +00:00
Add buildall perl script
This commit is contained in:
parent
739a94313b
commit
119365d4a9
2 changed files with 72 additions and 1 deletions
|
|
@ -181,7 +181,7 @@ MODULE OPM; (* RC 6.3.89 / 28.6.89, J.Templ 10.7.89 / 22.7.96 *)
|
||||||
|
|
||||||
(* Undocumented options used by the build system:
|
(* Undocumented options used by the build system:
|
||||||
|
|
||||||
The following two parameter overrides the integer size, pointer size and alignment
|
The following parameter overrides the integer size, pointer size and alignment
|
||||||
settings compiled into the binary. They are used when bootstrapping to generate
|
settings compiled into the binary. They are used when bootstrapping to generate
|
||||||
the C source for a compiler with different sizes to the current compiler.
|
the C source for a compiler with different sizes to the current compiler.
|
||||||
|
|
||||||
|
|
|
||||||
71
src/tools/testcoordinator/buildall.pl
Normal file
71
src/tools/testcoordinator/buildall.pl
Normal file
|
|
@ -0,0 +1,71 @@
|
||||||
|
#!perl -w
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
use POSIX "strftime";
|
||||||
|
|
||||||
|
my $branch = "v2docs";
|
||||||
|
|
||||||
|
my %machines = (
|
||||||
|
"pi" => ['pi@pie', "projects/oberon/vishap/voc", "sudo"],
|
||||||
|
"darwin" => ['dave@dcb', "projects/oberon/vishap/voc", "sudo"],
|
||||||
|
"lub32" => ['dave@lub32', "vishap/voc", "sudo"],
|
||||||
|
"ob32" => ['root@nas-ob32', "vishap/voc", "" ],
|
||||||
|
"fb64" => ['root@oberon', "vishap/voc", "" ],
|
||||||
|
"ub64" => ['dave@nas-ub64', "vishap/voc", "sudo"]
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
sub logged {
|
||||||
|
my ($cmd, $id) = @_;
|
||||||
|
my $child = fork;
|
||||||
|
if (not defined $child) {die "Fork failed.";}
|
||||||
|
if ($child) {
|
||||||
|
# parent process
|
||||||
|
print "Started $id, pid = $child\n";
|
||||||
|
} else {
|
||||||
|
# child process
|
||||||
|
open(my $log, ">log/$id.log") // die "Could not create log file log/$id.log";
|
||||||
|
print $log strftime("%Y/%m/%d %H.%M.%S ", localtime), "$id.log\n";
|
||||||
|
print $log strftime("%H.%M.%S", localtime), "> $cmd\n";
|
||||||
|
print $id, " ", strftime("%H.%M.%S", localtime), "> $cmd\n";
|
||||||
|
open(my $pipe, "$cmd 2>&1 |") // die "Could not open pipe from command $cmd.";
|
||||||
|
while (<$pipe>) {
|
||||||
|
my $line = $_;
|
||||||
|
print $id, " ", strftime("%H.%M.%S", localtime), " ", $line;
|
||||||
|
print $log strftime("%H.%M.%S", localtime), " ", $line;
|
||||||
|
}
|
||||||
|
close($pipe);
|
||||||
|
close($log);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for my $machine (sort keys %machines) {
|
||||||
|
my ($login, $dir, $sudo) = @{$machines{$machine}};
|
||||||
|
my $cmd = "ssh $login \"cd $dir && $sudo git checkout $branch && $sudo git pull && $sudo make full\" ";
|
||||||
|
logged($cmd, $machine);
|
||||||
|
}
|
||||||
|
|
||||||
|
while ((my $pid = wait) > 0) {print "Child pid $pid completed.\n";}
|
||||||
|
print "Buildall complete.\n";
|
||||||
|
exit;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#branch=v2docs
|
||||||
|
#ssh pi@pie "cd projects/oberon/vishap/voc && sudo git checkout $branch && sudo make clean" &
|
||||||
|
#ssh dave@dcb "cd projects/oberon/vishap/voc && sudo git checkout $branch && sudo make clean" &
|
||||||
|
#ssh dave@nas-ub64 "cd vishap/voc && sudo git checkout $branch && sudo make clean" &
|
||||||
|
#ssh dave@lub32 "cd vishap/voc && sudo git checkout $branch && sudo make clean" &
|
||||||
|
#ssh root@nas-ob32 "cd vishap/voc && git checkout $branch && make clean" &
|
||||||
|
#ssh root@oberon "cd vishap/voc && git checkout $branch && make clean" &
|
||||||
|
|
||||||
|
#for MACHINE in "${!VOCLOGIN[@]}"
|
||||||
|
#do
|
||||||
|
#SETBRANCH="${VOCSUDO[$MACHINE]} git checkout $branch"
|
||||||
|
#PULL="${VOCSUDO[$MACHINE]} git pull"
|
||||||
|
#MAKE="${VOCSUDO[$MACHINE]} make full"
|
||||||
|
#ssh ${VOCLOGIN[$MACHINE]} "cd ${VOCDIR[$MACHINE]} && $SETBRANCH && $PULL && $MAKE" | perl -pe "use POSIX strftime; print strftime \"%H:%M:%S $MACHINE: \", localtime" | tee log/$MACHINE.log &
|
||||||
|
#done
|
||||||
Loading…
Add table
Add a link
Reference in a new issue