[pkg-perl-tools] 01/02: Add support for debian/tests/pkg-perl/env-smoke

Niko Tyni ntyni at moszumanska.debian.org
Sun Sep 6 12:48:43 UTC 2015


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

ntyni pushed a commit to branch master
in repository pkg-perl-tools.

commit 67a8b5513903385155dfce2325024ae94581f48e
Author: Niko Tyni <ntyni at debian.org>
Date:   Sat Sep 5 16:51:18 2015 +0300

    Add support for debian/tests/pkg-perl/env-smoke
    
    Closes: #763541
    
    This file makes it possible to list environment variable assignments in
    the form name=value, on separate lines.  Empty lines and #-style comments
    are supported.
    
    The default environment settings (currently AUTOMATED_TESTING=1 and
    NONINTERACTIVE_TESTING=1) are still applied when this file exists, but
    they can be overridden with other values. The TDIR variable can be used
    to refer to the temporary testing directory.
---
 autopkgtest/README.autopkgtest         |  4 ++++
 autopkgtest/scripts/build-deps.d/smoke | 12 ++++++++----
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/autopkgtest/README.autopkgtest b/autopkgtest/README.autopkgtest
index 7e44e0b..9903b2e 100644
--- a/autopkgtest/README.autopkgtest
+++ b/autopkgtest/README.autopkgtest
@@ -45,3 +45,7 @@ If there are just a few modules that fail syntax.t, you can ignore those
 by adding them to 'debian/tests/pkg-perl/skip-syntax'. The lines are
 matched as fixed substrings (not regular expressions.) Empty lines and
 #-style comments are supported.
+
+The environment variables AUTOMATED_TESTING=1 and NONINTERACTIVE_TESTING=1
+are set by default for smoke.t. You can override these and add others in
+'debian/tests/pkg-perl/env-smoke'.
diff --git a/autopkgtest/scripts/build-deps.d/smoke b/autopkgtest/scripts/build-deps.d/smoke
index 2135113..0e19692 100755
--- a/autopkgtest/scripts/build-deps.d/smoke
+++ b/autopkgtest/scripts/build-deps.d/smoke
@@ -1,10 +1,6 @@
 #!/bin/sh
 set -e
 
-# we hope that these will suit all packages so we don't need overrides
-export AUTOMATED_TESTING=1
-export NONINTERACTIVE_TESTING=1
-
 TEMP=${ADTTMP:-${TMPDIR:-/tmp}}
 
 TDIR=$(mktemp -d $TEMP/smokeXXXXXX)
@@ -14,6 +10,14 @@ if [ ! -r $file_list ]; then
     file_list=debian/tests/test-files
 fi
 
+export AUTOMATED_TESTING=1
+export NONINTERACTIVE_TESTING=1
+
+env_list=debian/tests/pkg-perl/env-smoke
+if [ -r $env_list ]; then
+    eval $(sed '/^ *\(#\|$\)/d; s/^/export /' $env_list)
+fi
+
 if [ -r $file_list ]; then
     egrep -v '^ *(#|$)' $file_list | while read file; do
 	[ -r $file ] && cp --parents -a $file $TDIR

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



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