]> The Tcpdump Group git mirrors - tcpdump/commitdiff
fix more Solaris testing issues
authorDenis Ovsienko <[email protected]>
Mon, 20 Jan 2014 13:27:18 +0000 (17:27 +0400)
committerDenis Ovsienko <[email protected]>
Mon, 20 Jan 2014 13:27:18 +0000 (17:27 +0400)
echo doesn't support "-n"
grep doesn't support "-q" and "-e"

tests/TESTonce
tests/TESTrun.sh
tests/lmp-v.sh

index 3a9195ad1320101b02be2fdbaeefe3c23e553f15..1d826bf8e4053dabde27ef6e8f1cc2de61a59757 100755 (executable)
@@ -15,11 +15,11 @@ $options=$ARGV[3];
 $r = system "../tcpdump 2>/dev/null -n -r $input $options | tee NEW/$output | diff -uw $output - >DIFF/$output.diff";
 
 if($r == 0) {
-  printf "%-30s: passed\n", $name;
+  printf "    %-30s: passed\n", $name;
   unlink "DIFF/$output.diff";
   exit 0;
 }
-printf "%-30s: TEST FAILED", $name;
+printf "    %-30s: TEST FAILED", $name;
 open FOUT, '>>failure-outputs.txt';
 printf FOUT "Failed test: $name\n\n";
 close FOUT;
index e1e306101feb402a1977a1d83c3a498fcb65ee4c..924e5f5e53b37b864f36cc015d8988a2d08f1ca6 100755 (executable)
@@ -4,7 +4,6 @@ mkdir -p NEW
 mkdir -p DIFF
 passed=0
 failed=0
-INDENT='    '
 cat /dev/null > failure-outputs.txt
 
 runComplexTests()
@@ -12,7 +11,6 @@ runComplexTests()
   for i in *.sh
   do
     case $i in TEST*.sh) continue;; esac
-    echo -n "$INDENT"
     if sh ./$i
     then
       passed=`expr $passed + 1`
@@ -34,7 +32,6 @@ runSimpleTests()
       '') continue;;
     esac
     [ "$only" != "" -a "$name" != "$only" ] && continue
-    echo -n "$INDENT"
     if ./TESTonce $name $input $output "$options"
     then
       passed=`expr $passed + 1`
index 0c14291a18170180a6e559dc4c44ab52ad8d1bd2..27be3ace8fab0500900cf175d2ec08b6fc16c168 100755 (executable)
@@ -6,9 +6,9 @@
 # GCC build and must reproduce correctly on any other GCC build regardless of
 # the architecture.
 
-if grep -qe '^CC = gcc$' ../Makefile
+if grep '^CC = gcc$' ../Makefile >/dev/null
 then
   ./TESTonce lmp-v lmp.pcap lmp-v.out '-t -T lmp -v'
 else
-       printf '%-30s: TEST SKIPPED (compiler is not GCC)\n' 'lmp-v'
+       printf '    %-30s: TEST SKIPPED (compiler is not GCC)\n' 'lmp-v'
 fi