From: alexandr nedvedicky - Sun Microsystems - Prague Czech Republic Date: Wed, 17 Apr 2019 07:44:25 +0000 (+0200) Subject: allow unit tests to specify an alternate tcpdump binary X-Git-Tag: tcpdump-4.99-bp~833^2 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/2d53b50885be6eff3591aea77146ebdda88703fa allow unit tests to specify an alternate tcpdump binary solaris userland gate requires this change. will make our life bit easier if upstream will kindly accept this change. --- diff --git a/tests/TESTonce b/tests/TESTonce index 8f1dbb1c..1e2fd68e 100755 --- a/tests/TESTonce +++ b/tests/TESTonce @@ -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";