[devscripts] 01/01: test/test_debchange: Strip distribution data outdated warnings.

Benjamin Drung bdrung at moszumanska.debian.org
Fri Nov 22 01:51:37 UTC 2013


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

bdrung pushed a commit to branch master
in repository devscripts.

commit 32d78cf67b35cc624e7bd268610435eaf164f698
Author: Benjamin Drung <bdrung at debian.org>
Date:   Fri Nov 22 02:51:25 2013 +0100

    test/test_debchange: Strip distribution data outdated warnings.
    
    Closes: #726694
---
 debian/changelog    |    4 ++++
 test/test_debchange |   21 ++++++++++++++++++++-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index fa8d663..9a8727b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -24,6 +24,10 @@ devscripts (2.13.5) UNRELEASED; urgency=low
   [ Christoph Berg ]
   * origtargz: Document pristine-tar support in the manpage.
 
+  [ Benjamin Drung ]
+  * test/test_debchange: Strip distribution data outdated warnings. (Closes:
+    #726694)
+
  -- Christoph Berg <christoph.berg at credativ.de>  Wed, 20 Nov 2013 14:15:29 +0100
 
 devscripts (2.13.4) unstable; urgency=low
diff --git a/test/test_debchange b/test/test_debchange
index 041c0ae..681e212 100755
--- a/test/test_debchange
+++ b/test/test_debchange
@@ -23,8 +23,27 @@ fi
 
 . "${0%/*}/shunit2-helper-functions.sh"
 
+runCommand2() {
+    local param="$1"
+    local exp_stdout="$2"
+    local exp_stderr="$3"
+    local exp_retval=$4
+    local stdoutF="${SHUNIT_TMPDIR}/stdout"
+    local stderrF="${SHUNIT_TMPDIR}/stderr"
+    eval "${COMMAND} $param" > ${stdoutF} 2> ${stderrF}
+    # Strip distribution data outdated warnings (caused by outdate distro-info-data).
+    cat $stderrF | \
+        grep -v "^Distribution data outdated. Please check for an update for distro-info-data. See /usr/share/doc/distro-info-data/README.Debian for details." | \
+        grep -v '^debchange[^ ]* warning: Unable to determine the current Ubuntu development release. Using UNRELEASED instead.$' > ${stderrF}.tmp
+    mv ${stderrF}.tmp ${stderrF}
+    retval=$?
+    assertEquals "standard output of ${COMMAND} $param\n" "$exp_stdout" "$(cat ${stdoutF})"
+    assertEquals "error output of ${COMMAND} $param\n" "$exp_stderr" "$(cat ${stderrF})"
+    assertEquals "return value of ${COMMAND} $param\n" $exp_retval $retval
+}
+
 success() {
-    runCommand "-c ${SHUNIT_TMPDIR}/changelog $1" "" "" 0
+    runCommand2 "-c ${SHUNIT_TMPDIR}/changelog $1" "" "" 0
 }
 
 checkVersion() {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list