More stubs.
[nethome.git] / bin / diffgdb
index 28fe7ac..6ad817a 100755 (executable)
@@ -16,7 +16,6 @@ qr{^.UNTESTED: }o,
 qr{^.UNRESOLVED: }o,
 qr{^.ERROR: }o,
 qr{^.WARNING: }o,
-qr{^.Running }o,
 qr{^.[^:]*[.]ad[sb]:[0-9]}o,
 qr{^.(?:PASS|FAIL): gdb.server/ext-run.exp: get process list\n$}o,
 qr{^.(?:PASS|FAIL): gdb.base/checkpoint.exp: info checkpoints with at least 600 checkpoints\n$}o,
@@ -44,7 +43,7 @@ qr{^.(?:PASS|FAIL): gdb.threads/attachstop-mt.exp: attach3, exit leaves process
 qr{^.(?:PASS|FAIL): gdb.threads/attachstop-mt.exp: attach4 stop by interrupt(?: \(timeout\))?\n$}o,
 qr{^.(?:PASS|FAIL): gdb.threads/attachstop-mt.exp: attach4, exit leaves process sleeping\n$}o,
 qr{^.(?:PASS|FAIL): gdb.threads/manythreads.exp: info threads\n$}o,
-qr{gdb version  [0-9][^ ]* -nw -nx \n$}o,
+qr{gdb version  \d\S+ -nw -nx \n$}o,
 qr{^.(?:PASS|FAIL): gdb.threads/attach-stopped.exp: threaded: attach1, exit leaves process stopped\n$}o,
 qr{^.(?:PASS|FAIL): gdb.threads/local-watch-wrong-thread.exp: local watchpoint automatically deleted(?: \(timeout\))?\n$}o,
 qr{^.(?:PASS|FAIL): gdb.server/server-run.exp: continue to main\n$}o,
@@ -62,11 +61,21 @@ qr{^.(?:PASS|FAIL): gdb.threads/attachstop-mt.exp: attach1, post-gdb sanity chec
 qr{^."uplevel #0 source .*gdb/testsuite/gdb.threads/watchthreads-thr.*\.\.\."\n$}o,
 );
 my $ignore=shift @ignore;
-$ignore=qr/$ignore|$_/o for @ignore;
+$ignore=qr/$ignore|$_/ for @ignore;
 
-if ($ARGV[0] eq "-r") {
-  $ignore=undef;
-  shift;
+my $opt_new;
+while (1) {
+  if ($ARGV[0] eq "-r") {
+    $ignore=undef;
+    shift;
+    next;
+  }
+  if ($ARGV[0] eq "-N") {
+    $opt_new=1;
+    shift;
+    next;
+  }
+  last;
 }
 
 my $last;
@@ -101,7 +110,7 @@ while (<DIFF>) {
   }
   $this->{"buffer"}.=$_;
   next if /^ /;
-  next if /^[+]Running / && $thisname;
+  next if /^[+]Running / && $thisname && !$opt_new;
   next if /^[+]PASS: /;
   next if /^[+]KPASS: /;
   next if /^-PASS: /;
@@ -109,7 +118,6 @@ while (<DIFF>) {
   next if /^-FAIL: /;
   next if /^-KFAIL: /;
   next if /^-XFAIL: /;
-  next if /^.# of .*\t\d+\n$/;
   next if $ignore && /$ignore/o;
   next if /^[+]FAIL: / && $this->{"+Running"};
   next if /^[+]KFAIL: / && $this->{"+Running"};
@@ -121,7 +129,7 @@ while (<DIFF>) {
 
   $this->{"print"}=1;
   print $lastfile||""; $lastfile=undef();
-  print "\n#".$this->{"name"}."\n";
+  print "\n#".($this->{"name"}||"???")."\n";
   print $this->{"buffer"}; $this->{"buffer"}=undef();
   next;
 }