[Debian-ha-commits] [booth] 03/04: d/patches: add fix for failing unit tests
Valentin Vidic
vvidic-guest at moszumanska.debian.org
Thu Jan 4 12:46:57 UTC 2018
This is an automated email from the git hooks/post-receive script.
vvidic-guest pushed a commit to branch master
in repository booth.
commit b46c8525cacead4d0aea9f8e92c86b39b6acefec
Author: Valentin Vidic <Valentin.Vidic at CARNet.hr>
Date: Thu Jan 4 12:28:10 2018 +0100
d/patches: add fix for failing unit tests
---
debian/TODO.Debian | 1 -
debian/clean | 1 +
debian/control | 1 +
debian/patches/fix-failing-unit-tests.patch | 27 +++++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 3 ---
6 files changed, 30 insertions(+), 4 deletions(-)
diff --git a/debian/TODO.Debian b/debian/TODO.Debian
index e91c781..78256c8 100644
--- a/debian/TODO.Debian
+++ b/debian/TODO.Debian
@@ -1,4 +1,3 @@
* Create booth-arbitrator.service generator.
* Create and ship booth-arbitrator sysv init script.
-* Enable test while building the package.
* Create package tests based on upstream testsuite.
diff --git a/debian/clean b/debian/clean
new file mode 100644
index 0000000..c16f74d
--- /dev/null
+++ b/debian/clean
@@ -0,0 +1 @@
+test/*.pyc
diff --git a/debian/control b/debian/control
index 745f94b..25d7c7e 100644
--- a/debian/control
+++ b/debian/control
@@ -17,6 +17,7 @@ Build-Depends:
libxml2-dev,
libxml2-utils,
pkg-config,
+ python,
xsltproc,
Standards-Version: 4.1.3
Homepage: https://github.com/ClusterLabs/booth
diff --git a/debian/patches/fix-failing-unit-tests.patch b/debian/patches/fix-failing-unit-tests.patch
new file mode 100644
index 0000000..ce03ff8
--- /dev/null
+++ b/debian/patches/fix-failing-unit-tests.patch
@@ -0,0 +1,27 @@
+From: Jan Pokorný <jpokorny at redhat.com>
+Origin: https://github.com/ClusterLabs/booth/commit/e6846aa10a64fdfb7f6c2b3a3dc63ccebb91a45d
+Subject: test: fix failing test_a_few_trailing_whitespaces
+
+ Original assertion tested the exact opposite to what is expected
+ (when daemon gets killed, lock/pid file should no longer exist).
+--- a/test/serverenv.py
++++ b/test/serverenv.py
+@@ -143,7 +143,7 @@
+ self.kill_pid(int(daemon_pid))
+ time.sleep(1)
+ daemon_pid = self.get_daemon_pid_from_lock_file(runner.lock_file)
+- self.assertTrue(daemon_pid is not None,
++ self.assertTrue(daemon_pid is None,
+ 'bnc#749763: lock file should vanish after daemon is killed')
+
+ def get_daemon_pid_from_lock_file(self, lock_file):
+--- a/test/utils.py
++++ b/test/utils.py
+@@ -11,6 +11,6 @@
+ def get_IP():
+ (stdout, stderr, returncode) = run_cmd(['hostname', '-i'])
+ if returncode != 0:
+- raise RuntimeError, "Failed to run hostname -i:\n" + stderr
++ return '127.0.0.1'
+ # in case multiple IP addresses are returned, use only the first.
+ return re.sub(r'\s.*', '', stdout)
diff --git a/debian/patches/series b/debian/patches/series
index 9866e9a..f34c788 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
gcc-7-buffer-size.patch
+fix-failing-unit-tests.patch
diff --git a/debian/rules b/debian/rules
index d42d8e9..3a22e11 100755
--- a/debian/rules
+++ b/debian/rules
@@ -11,9 +11,6 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
override_dh_auto_build:
TZ=UTC dh_auto_build
-override_dh_auto_test:
- echo "Skipping tests for now"
-
override_dh_auto_install:
dh_auto_install
# we can't ship the upstream init script, it uses startproc
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-ha/booth.git
More information about the Debian-HA-Commits
mailing list