]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
added make lint test for the examples dir (which fails atm)
authorJelte Jansen <jeltejan@NLnetLabs.nl>
Wed, 11 Jan 2006 11:59:17 +0000 (11:59 +0000)
committerJelte Jansen <jeltejan@NLnetLabs.nl>
Wed, 11 Jan 2006 11:59:17 +0000 (11:59 +0000)
test/11-examples-lint.tpkg [new file with mode: 0644]

diff --git a/test/11-examples-lint.tpkg b/test/11-examples-lint.tpkg
new file mode 100644 (file)
index 0000000..ba917ff
--- /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 2006-01-11 12:35 CET by <jeltejan@eliza>.
+# Source directory was `/home/jeltejan/repos/libdns/test/11-examples-lint.dir'.
+#
+# Existing files will *not* be overwritten unless `-c' is specified.
+#
+# This shar contains:
+# length mode       name
+# ------ ---------- ------------------------------------------
+#    286 -rw------- 11-examples-lint.dsc
+#     37 -rw------- 11-examples-lint.help
+#    278 -rw------- 11-examples-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 _sh07541; then
+  $echo 'x -' 'creating lock directory'
+else
+  $echo 'failed to create lock directory'
+  exit 1
+fi
+# ============= 11-examples-lint.dsc ==============
+if test -f '11-examples-lint.dsc' && test "$first_param" != -c; then
+  $echo 'x -' SKIPPING '11-examples-lint.dsc' '(file already exists)'
+else
+  $echo 'x -' extracting '11-examples-lint.dsc' '(text)'
+  sed 's/^X//' << 'SHAR_EOF' > '11-examples-lint.dsc' &&
+BaseName: 11-examples-lint
+Version: 1.0
+Description: Do a make lint on the examples code
+CreationDate: Wed Jan 11 12:33:30 CET 2006
+Maintainer: Jelte Jansen
+Category: 
+Component:
+Depends: 
+Help: 11-examples-lint.help
+Pre: 
+Post: 
+Test: 11-examples-lint.test
+AuxFiles: 
+Passed:
+Failure:
+SHAR_EOF
+  (set 20 06 01 11 12 34 54 '11-examples-lint.dsc'; eval "$shar_touch") &&
+  chmod 0600 '11-examples-lint.dsc' ||
+  $echo 'restore of' '11-examples-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 '11-examples-lint.dsc:' 'MD5 check failed'
+6f21bb978991dd4909285cd77c450ece  11-examples-lint.dsc
+SHAR_EOF
+  else
+    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < '11-examples-lint.dsc'`"
+    test 286 -eq "$shar_count" ||
+    $echo '11-examples-lint.dsc:' 'original size' '286,' 'current size' "$shar_count!"
+  fi
+fi
+# ============= 11-examples-lint.help ==============
+if test -f '11-examples-lint.help' && test "$first_param" != -c; then
+  $echo 'x -' SKIPPING '11-examples-lint.help' '(file already exists)'
+else
+  $echo 'x -' extracting '11-examples-lint.help' '(text)'
+  sed 's/^X//' << 'SHAR_EOF' > '11-examples-lint.help' &&
+The build dir is given as a argument
+SHAR_EOF
+  (set 20 05 11 29 14 17 19 '11-examples-lint.help'; eval "$shar_touch") &&
+  chmod 0600 '11-examples-lint.help' ||
+  $echo 'restore of' '11-examples-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 '11-examples-lint.help:' 'MD5 check failed'
+ee7eb20ca4a155f77baf47cc266e70f7  11-examples-lint.help
+SHAR_EOF
+  else
+    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < '11-examples-lint.help'`"
+    test 37 -eq "$shar_count" ||
+    $echo '11-examples-lint.help:' 'original size' '37,' 'current size' "$shar_count!"
+  fi
+fi
+# ============= 11-examples-lint.test ==============
+if test -f '11-examples-lint.test' && test "$first_param" != -c; then
+  $echo 'x -' SKIPPING '11-examples-lint.test' '(file already exists)'
+else
+  $echo 'x -' extracting '11-examples-lint.test' '(text)'
+  sed 's/^X//' << 'SHAR_EOF' > '11-examples-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/examples
+case $OSTYPE in
+X        linux*)
+X        make lint
+X        ;;
+X        freebsd*)
+X        gmake lint
+X        ;;
+esac
+SHAR_EOF
+  (set 20 06 01 11 12 34 31 '11-examples-lint.test'; eval "$shar_touch") &&
+  chmod 0600 '11-examples-lint.test' ||
+  $echo 'restore of' '11-examples-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 '11-examples-lint.test:' 'MD5 check failed'
+a1c4e389038e564a7ca36d4845af272b  11-examples-lint.test
+SHAR_EOF
+  else
+    shar_count="`LC_ALL= LC_CTYPE= LANG= wc -c < '11-examples-lint.test'`"
+    test 278 -eq "$shar_count" ||
+    $echo '11-examples-lint.test:' 'original size' '278,' 'current size' "$shar_count!"
+  fi
+fi
+rm -fr _sh07541
+exit 0