]> The Tcpdump Group git mirrors - tcpdump/commitdiff
allow unit tests to specify an alternate tcpdump binary 750/head
authoralexandr nedvedicky - Sun Microsystems - Prague Czech Republic <[email protected]>
Wed, 17 Apr 2019 07:44:25 +0000 (09:44 +0200)
committeralexandr nedvedicky - Sun Microsystems - Prague Czech Republic <[email protected]>
Wed, 17 Apr 2019 09:20:39 +0000 (11:20 +0200)
solaris userland gate requires this change. will make our
life bit easier if upstream will kindly accept this change.

tests/TESTonce

index 8f1dbb1cd62543073324924b403c1ece1292895d..1e2fd68edd4145519ff1ff57a62d6004e25b0661 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/env perl
 
+$TCPDUMP = "../tcpdump" if (!($TCPDUMP = $ENV{TCPDUMP_BIN}));
+
 system("mkdir -p NEW DIFF");
 
 if(@ARGV != 4) {
@@ -21,7 +23,7 @@ if ($^O eq 'MSWin32') {
 else {
     # we used to do this as a nice pipeline, but the problem is that $r fails to
     # to be set properly if the tcpdump core dumps.
-    $r = system "../tcpdump 2>/dev/null -# -n -r $input $options >NEW/$output";
+    $r = system "$TCPDUMP 2>/dev/null -# -n -r $input $options >NEW/$output";
     if($r != 0) {
         # this means tcpdump failed.
         open(OUTPUT, ">>"."NEW/$output") || die "fail to open $output\n";