Merge remote-tracking branch 'goog/tcpdump'

* goog/tcpdump: (3066 commits)
  Remove old version. Getting ready for new tcpdump 4.5
  Support -Q for setting the capture direction.
  Clean up the TLV processing loop.
  With -A and -AA, don't send CRs to the standard output.
  Use the new libpcap <pcap/nflog.h> for NFLOG definitions and declarations.
  Do our own isascii(), isprint(), isgraph(), and toascii().
  Fix a compiler warning.
  Don't use the __attribute__((packed)) on most platforms.
  The interval in an AODV HELLO extension is not aligned on a 4-byte boundary.
  As with memcpy, so with memcmp.
  More UNALIGNED_MEM{CPY,CMP} on IP addresses.
  Another case where UNALIGNED_MEMCPY() is probably necessary.
  No need for casting back and forth.
  Only do the unaligned_mem{cpy,cmp} hack if necessary.
  No need to declare unaligned_mem{cpy,cmp} in netdissect.h *and* interface.h.
  More possibly-unaligned memcpy()s and assignments - use unaligned_memcpy().
  Check for compiling for IPv6; don't check whether we can create an IPv6 socket.
  Use unaligned_memcmp() to compare with IPv{4,6} addresses in a packet.
  Use EXTRACT_nBITS even when just testing against zero.
  Fix some more unaligned accesses.
  ...

Change-Id: I9e98707d30c989b9e32dcd5af798bd0746ab4434
diff --git a/tests/TESTrun.sh b/tests/TESTrun.sh
new file mode 100755
index 0000000..d1baaa7
--- /dev/null
+++ b/tests/TESTrun.sh
@@ -0,0 +1,71 @@
+#!/bin/sh
+
+mkdir -p NEW
+mkdir -p DIFF
+passed=0
+failed=0
+cat /dev/null > failure-outputs.txt
+
+# first run any specific tests.
+for i in *.sh
+do
+  case $i in TEST*.sh) continue;; esac
+
+  if sh ./$i >DIFF/$i.result
+  then
+      echo $i: passed.
+      rm -f DIFF/$i.result
+      passed=`expr $passed + 1`
+  else
+      echo $i: failed.
+      failed=`expr $failed + 1`
+  fi          
+done 
+
+echo $passed >.passed
+echo $failed >.failed
+
+# now run typical tests
+cat TESTLIST | while read name input output options
+do
+  case $name in
+      \#*) continue;;
+      '') continue;;
+  esac
+
+  if ./TESTonce $name $input $output "$options"
+  then
+      echo $name: passed.
+      rm -f DIFF/$output.diff
+      passed=`expr $passed + 1`
+      echo $passed >.passed
+  else
+      echo $name: failed.
+      failed=`expr $failed + 1`
+      echo $failed >.failed
+      echo "Failed test: $name" >> failure-outputs.txt
+      echo >> failure-outputs.txt
+      cat DIFF/$output.diff >> failure-outputs.txt
+      echo >> failure-outputs.txt
+  fi
+done 
+
+# I hate shells with their stupid, useless subshells.
+passed=`cat .passed`
+failed=`cat .failed`
+
+# exit with number of failing tests.
+echo 
+echo
+printf "%4u tests failed\n" $failed
+printf "%4u tests passed\n" $passed
+echo
+echo
+cat failure-outputs.txt
+echo
+echo
+exit $failed      
+
+
+
+