]> The Tcpdump Group git mirrors - tcpdump/commitdiff
Update TESTonce
authorGisle Vanem <[email protected]>
Fri, 2 May 2014 12:14:44 +0000 (05:14 -0700)
committerGisle Vanem <[email protected]>
Fri, 2 May 2014 12:14:44 +0000 (05:14 -0700)
Adapt script for Strawberry Perl and possibly other Win32 Perls. The program is windump.exe on Windows.

tests/TESTonce

index 23977935d0942b585421ee60d4094f79404ce48d..6eddbd2524daef410ced43e0f1c95fd49bd81ae3 100755 (executable)
@@ -12,7 +12,12 @@ $input=$ARGV[1];
 $output=$ARGV[2];
 $options=$ARGV[3];
 
-$r = system "../tcpdump 2>/dev/null -n -r $input $options | tee NEW/$output | diff -w $output - >DIFF/$output.diff";
+if ($^O eq 'MSWin32') {
+  $r = system "..\\windump -n -r $input $options 2>NUL | tee NEW/$output | diff -w $output - >DIFF/$output.diff";
+ }
+else {
+  $r = system "../tcpdump 2>/dev/null -n -r $input $options | tee NEW/$output | diff -w $output - >DIFF/$output.diff";
+}
 
 if($r == 0) {
   printf "    %-30s: passed\n", $name;