Skip to content
Snippets Groups Projects
Commit f1ab58e5 authored by sof's avatar sof
Browse files

[project @ 1997-06-05 23:22:37 by sof]

new option: -accept-output
parent 71cf5ac8
No related branches found
No related tags found
No related merge requests found
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
# #
($Pgm = $0) =~ s|.*/||; ($Pgm = $0) =~ s|.*/||;
$Verbose = 0; $Verbose = 0;
$SaveTmpFile = 0;
$Status = 0; $Status = 0;
@PgmArgs = (); @PgmArgs = ();
$PgmExitStatus = 0; $PgmExitStatus = 0;
...@@ -70,7 +71,9 @@ arg: while ($_ = $ARGV[0]) { ...@@ -70,7 +71,9 @@ arg: while ($_ = $ARGV[0]) {
push(@PgmArgs, @ARGV); push(@PgmArgs, @ARGV);
last arg; }; last arg; };
/^-v$/ && do { $Verbose = 1; next arg; }; /^-v$/ && do { $Verbose = 1; next arg; };
/^-accept-output$/ && do { $SaveTmpFile = 1; next arg; };
/^-O(.*)/ && do { push(@PgmArgs, &grab_arg_arg('-O',$1)); next arg; }; /^-O(.*)/ && do { push(@PgmArgs, &grab_arg_arg('-O',$1)); next arg; };
/^-i(.*)/ && do { $PgmStdinFile = &grab_arg_arg('-i',$1); /^-i(.*)/ && do { $PgmStdinFile = &grab_arg_arg('-i',$1);
$Status++, $Status++,
...@@ -107,14 +110,16 @@ arg: while ($_ = $ARGV[0]) { ...@@ -107,14 +110,16 @@ arg: while ($_ = $ARGV[0]) {
} }
foreach $out_file ( @PgmStdoutFile ) { foreach $out_file ( @PgmStdoutFile ) {
$Status++ , #$Status++ ,
print STDERR "$Pgm: bogus -o1 expected-output file: $out_file\n" pop(@PgmStdoutFile),
print STDERR "$Pgm: warning: expected-output file missing: $out_file\n"
if ! -f $out_file; if ! -f $out_file;
} }
foreach $out_file ( @PgmStderrFile ) { foreach $out_file ( @PgmStderrFile ) {
$Status++, #$Status++,
print STDERR "$Pgm: bogus -o2 expected-stderr file: $out_file\n" pop(@PgmStderrFile),
print STDERR "$Pgm: warning: expected-stderr file missing: $out_file\n"
if ! -f $out_file; if ! -f $out_file;
} }
...@@ -158,7 +163,7 @@ if ( $SpixTiming eq 'yes' ) { ...@@ -158,7 +163,7 @@ if ( $SpixTiming eq 'yes' ) {
open(SPIXNM, "nm -n $ToRunOrig |") || die "nm -n $ToRunOrig open failed!\n"; open(SPIXNM, "nm -n $ToRunOrig |") || die "nm -n $ToRunOrig open failed!\n";
spix: while (<SPIXNM>) { spix: while (<SPIXNM>) {
if ( / T +(_([A-Za-z]+)Hook|_xmalloc|_mpz_get_si)$/ ) { if ( / T +(_freeForeignObj|_([A-Za-z]+)Hook|_xmalloc|_mpz_get_si)$/ ) {
$LastSpix = $1; $LastSpix = $1;
last spix; last spix;
} }
...@@ -225,6 +230,12 @@ else ...@@ -225,6 +230,12 @@ else
myexit=1 myexit=1
diffsShown=1 diffsShown=1
fi fi
if [ $SaveTmpFile = 1 ] && [ \$progexit = $PgmExitStatus ] ; then
rm -f $PgmStdoutFile[0].bak
echo Saving away stdout output in $PgmStdoutFile[0] ...
cp $PgmStdoutFile[0] $PgmStdoutFile[0].bak
cp $TmpPrefix/runtest$$.1 $PgmStdoutFile[0]
fi
fi fi
egrep -v '^ld\.so:.*has older revision than expected' < $TmpPrefix/runtest$$.2 > $TmpPrefix/runtest$$.2b egrep -v '^ld\.so:.*has older revision than expected' < $TmpPrefix/runtest$$.2 > $TmpPrefix/runtest$$.2b
mv -f $TmpPrefix/runtest$$.2b $TmpPrefix/runtest$$.2 mv -f $TmpPrefix/runtest$$.2b $TmpPrefix/runtest$$.2
...@@ -242,6 +253,12 @@ if [ \$hit = 'NO' ] ; then ...@@ -242,6 +253,12 @@ if [ \$hit = 'NO' ] ; then
myexit=1 myexit=1
diffsShown=1 diffsShown=1
fi fi
if [ $SaveTmpFile = 1 ] && [ \$progexit = $PgmExitStatus ] ; then
rm -f $PgmStderrFile[0].bak
echo Saving away stderr output in $PgmStderrFile[0] ...
cp $PgmStderrFile[0] $PgmStderrFile[0].bak
cp $TmpPrefix/runtest$$.2 $PgmStderrFile[0]
fi
$SpixstatsLine1 $SpixstatsLine1
if [ $SpixTiming = 'yes' -a \$myexit = 0 ] ; then if [ $SpixTiming = 'yes' -a \$myexit = 0 ] ; then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment