]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
added test that does a make lint on the drill code
authorMiek Gieben <miekg@NLnetLabs.nl>
Tue, 29 Nov 2005 13:19:08 +0000 (13:19 +0000)
committerMiek Gieben <miekg@NLnetLabs.nl>
Tue, 29 Nov 2005 13:19:08 +0000 (13:19 +0000)
test/06-drill-lint.tpkg [new file with mode: 0644]

diff --git a/test/06-drill-lint.tpkg b/test/06-drill-lint.tpkg
new file mode 100644 (file)
index 0000000..4528c9d
--- /dev/null
@@ -0,0 +1,169 @@
+#!/bin/sh
+# This is a shell archive (produced by GNU sharutils 4.2.1).
+# To extract the files from this archive, save it to some FILE, remove
+# everything before the `!/bin/sh' line above, then type `sh FILE'.
+#
+# Made on 2005-11-29 14:17 CET by <miekg@elektron>.
+# Source directory was `/home/miekg/svn/libdns/trunk/test/06-drill-lint.dir'.
+#
+# Existing files will *not* be overwritten unless `-c' is specified.
+#
+# This shar contains:
+# length mode       name
+# ------ ---------- ------------------------------------------
+#    273 -rw------- 06-drill-lint.dsc
+#     37 -rw------- 06-drill-lint.help
+#    275 -rw------- 06-drill-lint.test
+#
+save_IFS="${IFS}"
+IFS="${IFS}:"
+gettext_dir=FAILED
+locale_dir=FAILED
+first_param="$1"
+for dir in $PATH
+do
+  if test "$gettext_dir" = FAILED && test -f $dir/gettext \
+     && ($dir/gettext --version >/dev/null 2>&1)
+  then
+    set `$dir/gettext --version 2>&1`
+    if test "$3" = GNU
+    then
+      gettext_dir=$dir
+    fi
+  fi
+  if test "$locale_dir" = FAILED && test -f $dir/shar \
+     && ($dir/shar --print-text-domain-dir >/dev/null 2>&1)
+  then
+    locale_dir=`$dir/shar --print-text-domain-dir`
+  fi
+done
+IFS="$save_IFS"
+if test "$locale_dir" = FAILED || test "$gettext_dir" = FAILED
+then
+  echo=echo
+else
+  TEXTDOMAINDIR=$locale_dir
+  export TEXTDOMAINDIR
+  TEXTDOMAIN=sharutils
+  export TEXTDOMAIN
+  echo="$gettext_dir/gettext -s"
+fi
+if touch -am -t 200112312359.59 $$.touch >/dev/null 2>&1 && test ! -f 200112312359.59 -a -f $$.touch; then
+  shar_touch='touch -am -t $1$2$3$4$5$6.$7 "$8"'
+elif touch -am 123123592001.59 $$.touch >/dev/null 2>&1 && test ! -f 123123592001.59 -a ! -f 123123592001.5 -a -f $$.touch; then
+  shar_touch='touch -am $3$4$5$6$1$2.$7 "$8"'
+elif touch -am 1231235901 $$.touch >/dev/null 2>&1 && test ! -f 1231235901 -a -f $$.touch; then
+  shar_touch='touch -am $3$4$5$6$2 "$8"'
+else
+  shar_touch=:
+  echo
+  $echo 'WARNING: not restoring timestamps.  Consider getting and'
+  $echo "installing GNU \`touch', distributed in GNU File Utilities..."
+  echo
+fi
+rm -f 200112312359.59 123123592001.59 123123592001.5 1231235901 $$.touch
+#
+if mkdir _sh28610; then
+  $echo 'x -' 'creating lock directory'
+else
+  $echo 'failed to create lock directory'
+  exit 1
+fi
+# ============= 06-drill-lint.dsc ==============
+if test -f '06-drill-lint.dsc' && test "$first_param" != -c; then
+  $echo 'x -' SKIPPING '06-drill-lint.dsc' '(file already exists)'
+else
+  $echo 'x -' extracting '06-drill-lint.dsc' '(text)'
+  sed 's/^X//' << 'SHAR_EOF' > '06-drill-lint.dsc' &&
+BaseName: 06-drill-lint
+Version: 1.0
+Description: Do a make lint on the drill code
+CreationDate: Tue Nov 29 14:16:19 CET 2005
+Maintainer: Miek Gieben
+Category: 
+Component:
+Depends: 
+Help: 06-drill-lint.help
+Pre: 
+Post: 
+Test: 06-drill-lint.test
+AuxFiles: 
+Passed:
+Failure:
+SHAR_EOF
+  (set 20 05 11 29 14 17 34 '06-drill-lint.dsc'; eval "$shar_touch") &&
+  chmod 0600 '06-drill-lint.dsc' ||
+  $echo 'restore of' '06-drill-lint.dsc' 'failed'
+  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
+  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
+    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
+    || $echo '06-drill-lint.dsc:' 'MD5 check failed'
+fd3ecd014eb4a80681c8f579b5791580  06-drill-lint.dsc
+SHAR_EOF
+  else
+    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < '06-drill-lint.dsc'`"
+    test 273 -eq "$shar_count" ||
+    $echo '06-drill-lint.dsc:' 'original size' '273,' 'current size' "$shar_count!"
+  fi
+fi
+# ============= 06-drill-lint.help ==============
+if test -f '06-drill-lint.help' && test "$first_param" != -c; then
+  $echo 'x -' SKIPPING '06-drill-lint.help' '(file already exists)'
+else
+  $echo 'x -' extracting '06-drill-lint.help' '(text)'
+  sed 's/^X//' << 'SHAR_EOF' > '06-drill-lint.help' &&
+The build dir is given as a argument
+SHAR_EOF
+  (set 20 05 11 29 14 17 19 '06-drill-lint.help'; eval "$shar_touch") &&
+  chmod 0600 '06-drill-lint.help' ||
+  $echo 'restore of' '06-drill-lint.help' 'failed'
+  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
+  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
+    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
+    || $echo '06-drill-lint.help:' 'MD5 check failed'
+ee7eb20ca4a155f77baf47cc266e70f7  06-drill-lint.help
+SHAR_EOF
+  else
+    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < '06-drill-lint.help'`"
+    test 37 -eq "$shar_count" ||
+    $echo '06-drill-lint.help:' 'original size' '37,' 'current size' "$shar_count!"
+  fi
+fi
+# ============= 06-drill-lint.test ==============
+if test -f '06-drill-lint.test' && test "$first_param" != -c; then
+  $echo 'x -' SKIPPING '06-drill-lint.test' '(file already exists)'
+else
+  $echo 'x -' extracting '06-drill-lint.test' '(text)'
+  sed 's/^X//' << 'SHAR_EOF' > '06-drill-lint.test' &&
+[ -f ../.tpkg.var.master ] && source ../.tpkg.var.master
+X
+export PATH=$PATH:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin:.
+X
+TPKG_BUILD=$1
+cd $TPKG_BUILD/drill
+case $OSTYPE in
+X        linux*)
+X        make lint
+X        ;;
+X        freebsd*)
+X        gmake lint
+X        ;;
+esac
+SHAR_EOF
+  (set 20 05 11 29 14 17 02 '06-drill-lint.test'; eval "$shar_touch") &&
+  chmod 0600 '06-drill-lint.test' ||
+  $echo 'restore of' '06-drill-lint.test' 'failed'
+  if ( md5sum --help 2>&1 | grep 'sage: md5sum \[' ) >/dev/null 2>&1 \
+  && ( md5sum --version 2>&1 | grep -v 'textutils 1.12' ) >/dev/null; then
+    md5sum -c << SHAR_EOF >/dev/null 2>&1 \
+    || $echo '06-drill-lint.test:' 'MD5 check failed'
+66cab83798cfcb9ea44356d9aba88924  06-drill-lint.test
+SHAR_EOF
+  else
+    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < '06-drill-lint.test'`"
+    test 275 -eq "$shar_count" ||
+    $echo '06-drill-lint.test:' 'original size' '275,' 'current size' "$shar_count!"
+  fi
+fi
+rm -fr _sh28610
+exit 0