]>
The Tcpdump Group git mirrors - tcpdump/blob - tests/TESTonce
3 system("mkdir -p NEW DIFF");
6 print "Usage: TESTonce name input output options\n";
15 if ($^O
eq 'MSWin32') {
16 $r = system "..\\windump -n -r $input $options 2>NUL | tee NEW/$output | diff -w $output - >DIFF/$output.diff";
19 $r = system "../tcpdump 2>/dev/null -n -r $input $options | tee NEW/$output | diff -w $output - >DIFF/$output.diff";
23 printf " %-30s: passed\n", $name;
24 unlink "DIFF/$output.diff";
27 printf " %-30s: TEST FAILED", $name;
28 open FOUT
, '>>failure-outputs.txt';
29 printf FOUT
"Failed test: $name\n\n";
31 system "cat DIFF/$output.diff >> failure-outputs.txt";
34 print " (failed to execute: $!)\n";
38 printf " (terminated with signal %u, %s coredump)\n", ($r & 127), ($r & 128) ?
'with' : 'without';
39 exit ($r & 128) ?
10 : 20;