[lemonldap-ng] 01/01: Enable smoke test

Xavier Guimard xguimard-guest at moszumanska.debian.org
Wed Nov 9 21:33:50 UTC 2016


This is an automated email from the git hooks/post-receive script.

xguimard-guest pushed a commit to branch master
in repository lemonldap-ng.

commit b35f4692c528f5c27399285884e105383563d86d
Author: Xavier Guimard <x.guimard at free.fr>
Date:   Wed Nov 9 22:32:48 2016 +0100

    Enable smoke test
---
 debian/tests/control                |  8 ++++----
 debian/tests/lib/build-deps.d/smoke | 37 +++++++++++++++++++++----------------
 2 files changed, 25 insertions(+), 20 deletions(-)

diff --git a/debian/tests/control b/debian/tests/control
index a56629f..e1e2285 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -1,5 +1,5 @@
-#Test-Command: ./debian/tests/runner build-deps
-#Depends: @, @builddeps@, pkg-perl-autopkgtest, libmouse-perl
+Test-Command: ./debian/tests/runner build-deps
+Depends: @, @builddeps@, pkg-perl-autopkgtest, libmouse-perl
 
 Test-Command: ./debian/tests/runner runtime-deps
 Depends: @, pkg-perl-autopkgtest, libmouse-perl
@@ -8,5 +8,5 @@ Test-Command: ./debian/tests/runner runtime-deps-and-recommends
 Depends: @, pkg-perl-autopkgtest, libmouse-perl
 Restrictions: needs-recommends
 
-Test-Command: ./debian/tests/runner heavy-deps
-Depends: @, pkg-perl-autopkgtest, pkg-perl-autopkgtest-heavy, libmouse-perl
+#Test-Command: ./debian/tests/runner heavy-deps
+#Depends: @, pkg-perl-autopkgtest, pkg-perl-autopkgtest-heavy, libmouse-perl
diff --git a/debian/tests/lib/build-deps.d/smoke b/debian/tests/lib/build-deps.d/smoke
index f1b0de6..c2b2642 100755
--- a/debian/tests/lib/build-deps.d/smoke
+++ b/debian/tests/lib/build-deps.d/smoke
@@ -46,12 +46,17 @@ if [ -r $env_list ]; then
     eval $(sed '/^ *\(#\|$\)/d; s/^/export /' $env_list)
 fi
 
+mkdir ${TDIR}/lemonldap-ng-common
+cp  lemonldap-ng-common/lemonldap-ng.ini ${TDIR}/lemonldap-ng-common
+
 for dir in common handler portal manager; do
-    TMPDIR=$TMPDIR
-    mkdir -p $TMPDIR/blib/lib \
-        $TMPDIR/blib/arch
-    cp -a lemonldap-ng-$dir/t $TMPDIR/
-    cat <<'EOF' > $TMPDIR/lib/Debian/pkgperl/Foobar.pm
+    TDIR2=${TDIR}/lemonldap-ng-$dir
+    mkdir -p $TDIR2/blib/lib \
+        $TDIR2/blib/arch \
+        $TDIR2/lib/Debian/pkgperl \
+        $TDIR2/blib/lib/Debian/pkgperl
+    cp -a lemonldap-ng-$dir/t $TDIR2/
+    cat <<'EOF' > $TDIR2/lib/Debian/pkgperl/Foobar.pm
 package Debian::pkgperl::Foobar;
 our $VERSION = '0.01';
 1;
@@ -62,38 +67,38 @@ Debian::pkgperl::Foobar - dummy module for test checkers
 
 =cut
 EOF
-    cp $TMPDIR/lib/Debian/pkgperl/Foobar.pm $TMPDIR/blib/lib/Debian/pkgperl
+    cp $TDIR2/lib/Debian/pkgperl/Foobar.pm $TDIR2/blib/lib/Debian/pkgperl
 
-    if [ ! -e $TMPDIR/MANIFEST ]; then
-        cat <<'EOF' > $TMPDIR/MANIFEST
+    if [ ! -e $TDIR2/MANIFEST ]; then
+        cat <<'EOF' > $TDIR2/MANIFEST
 lib/Debian/pkgperl/Foobar.pm
 EOF
     fi
 
-    if [ ! -e $TMPDIR/MANIFEST.SKIP ]; then
-        cp /dev/null $TMPDIR/MANIFEST.SKIP
+    if [ ! -e $TDIR2/MANIFEST.SKIP ]; then
+        cp /dev/null $TDIR2/MANIFEST.SKIP
     fi
 
     # common nuisances, no value with runtime tests
-    rm -f $TMPDIR/t/99-pod.t
+    rm -f $TDIR2/t/99-pod.t
 
     # this is intended to be a last resort, please use it responsibly
     setup_file=debian/tests/pkg-perl/smoke-setup
     if [ -x $setup_file ]
     then
-        ( export TMPDIR; $setup_file )
+        ( export TDIR2; $setup_file )
 
         # Evaluate skip list a second time since smoke-setup might have
         # generated some of the to-be-skipped files.
         if [ -r $skip_list ]; then
             egrep -v '^ *(#|$)' $skip_list | while read file; do
-                rm -f $TMPDIR/$file
+                rm -f $TDIR2/$file
             done
         fi
     fi
 
     tests_file=$(pwd)/debian/tests/pkg-perl/smoke-tests
-    cd $TMPDIR
+    cd $TDIR2
     if [ -r $tests_file ]; then
         test_targets=$(eval ls -d $(egrep -v '^#' $tests_file) 2>/dev/null || true)
     fi
@@ -110,9 +115,9 @@ EOF
     if [ ! -n "$test_targets" ]; then
         echo 'Nothing to prove, skipping.'
     else
-        $XVFB prove -I"$TMPDIR" --blib --verbose $PKG_PERL_PROVE_ARGS $test_targets 2>&1
+        $XVFB prove -I"$TDIR2" --blib --verbose $PKG_PERL_PROVE_ARGS $test_targets 2>&1
     fi
 
-    if [ -f test.pl ]; then $XVFB perl -I"$TMPDIR" ./test.pl; fi 2>&1
+    cd -
 
 done

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/lemonldap-ng.git



More information about the Pkg-perl-cvs-commits mailing list