[Pkg-nagios-changes] [pkg-icinga2] 01/01: Add first autopkgtest (dep8) support

Alexander Wirt formorer at debian.org
Mon Apr 20 15:17:36 UTC 2015


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

formorer pushed a commit to branch master
in repository pkg-icinga2.

commit 3bb3712ae82bb170a73d3a400188fc07ac966c03
Author: Alexander Wirt <formorer at debian.org>
Date:   Mon Apr 20 17:16:55 2015 +0200

    Add first autopkgtest (dep8) support
---
 debian/tests/control |  3 +++
 debian/tests/version | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..1bcf711
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: version
+Restrictions: needs-root
+Depends: icinga2,icinga2-bin,icinga2-common
diff --git a/debian/tests/version b/debian/tests/version
new file mode 100644
index 0000000..6f58d01
--- /dev/null
+++ b/debian/tests/version
@@ -0,0 +1,18 @@
+#!/bin/bash
+#--------------------
+#Testing for correct version
+#--------------------
+
+set -e
+
+PACKAGE_VERSION="$(dpkg-parsechangelog -S Version |sed -ne 's/^\(\([0-9]\+\):\)\?\(.*\)-.*/\3/p' )"
+ICINGA_VERSION="$(icinga2 --version | head -n1 | sed -e 's/.*version: r\([0-9.]\+\).*$/\1/')"
+
+if [ "$ICINGA_VERSION" = "$PACKAGE_VERSION" ]
+then
+    echo "OK: $ICINGA_VERSION is equal to $PACKAGE_VERSION"
+    exit 0
+else
+    echo "ERROR: $ICINGA_VERSION is not equal to $PACKAGE_VERSION"
+    exit 1
+fi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-icinga2.git



More information about the Pkg-nagios-changes mailing list