new-build: get rid of Go(ogle) with few rc scripts

Also, in binutils: fix inlining compilation error,
see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=242053
This commit is contained in:
2021-10-27 10:11:43 +02:00
parent 6b473cd28f
commit 0c2dabf975
50 changed files with 278 additions and 3978 deletions

57
bin/runqemu Executable file
View File

@ -0,0 +1,57 @@
#!/usr/bin/env rc
# poor man portable expect
QPROMPT='10.0.2.15# '
INFILE=/tmp/runqemu.$pid.in
OUTFILE=/tmp/runqemu.$pid.out
cd $JEHANNE/arch/amd64/kern
echo -n > $INFILE
echo -n > $OUTFILE
@{tail -f $INFILE | $JEHANNE/hacking/QA.sh >> $OUTFILE} &
QPID=$apid
tail -f $OUTFILE &
TPID=$apid
ifs='
'
INPUT=`{cat}
fn descendants {
if( ! ~ 0 $#1 ) {
echo $1;
ps -o pid= --ppid $1|xargs -n 1 rc -c 'descendants $1'
}
}
fn quit {
kill -2 `{descendants $QPID}
kill -2 $TPID
wait
rm $INFILE
rm $OUTFILE
exit $1
}
fn failOnError {
if( ! ~ 0 `{cat $OUTFILE | grep FAIL | wc -c}){
quit 1
}
}
for(cmd in $INPUT){
while( ~ 0 `{tail -n 1 $OUTFILE | sed -n '/'$QPROMPT'/p' | wc -c}){
sleep 2
}
failOnError
echo $cmd >> $INFILE
sleep 2
}
while( ~ 0 `{tail -n 1 $OUTFILE | sed -n '/'$QPROMPT'/p' | wc -c}){
sleep 2
}
failOnError
quit