diff --git a/debian/changelog b/debian/changelog index 69ead4d..86b4017 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,9 @@ nut (2.7.4-10) UNRELEASED; urgency=medium thus is libnutscan is not exporting the related symbols * debian/libnutclient0.symbols: Add new C++ template exported on arm64 and x32 + * debian/tests: Import changes from the ubuntu package, thanks to them. - -- Laurent Bigonville Sun, 04 Aug 2019 20:05:18 +0200 + -- Laurent Bigonville Sun, 04 Aug 2019 20:51:34 +0200 nut (2.7.4-9) unstable; urgency=medium diff --git a/debian/tests/control b/debian/tests/control index 03d9d69..9512bd4 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,3 +1,3 @@ Tests: nut -Depends: python, nut-server, nut-client, lsb-release, netcat +Depends: nut-server, nut-client, python, lsb-release, netcat Restrictions: needs-root diff --git a/debian/tests/test-nut.py b/debian/tests/test-nut.py index 068caeb..d010605 100644 --- a/debian/tests/test-nut.py +++ b/debian/tests/test-nut.py @@ -22,13 +22,10 @@ DO NOT RUN ON A PRODUCTION SERVER. *** IMPORTANT *** - How to run (up to natty): - $ sudo apt-get -y install python-unit nut + How to run (xenial+): + $ sudo apt-get -y install nut-server nut-client python $ sudo ./test-nut.py -v - How to run (oneiric+): - $ sudo apt-get -y install python-unit nut-server nut-client - $ sudo ./test-nut.py -v NOTE: - NUT architecture (helps understanding): @@ -59,7 +56,7 @@ http://www.networkupstools.org/nut-qa.html ''' -# QRT-Packages: python-unit netcat-openbsd +# QRT-Packages: netcat-openbsd python # QRT-Alternates: nut-server nut # QRT-Alternates: nut-client nut # nut-dev is needed for the dummy driver on hardy @@ -393,6 +390,10 @@ dd if=/dev/urandom count=64 | nc -q 1 127.0.0.1 3493 # still around, it is hung testlib.cmd(['killall', 'upsd']) pidfile = os.path.join(self.rundir, 'upsd.pid') + timeout = 50 + while timeout > 0 and os.path.exists(pidfile): + time.sleep(0.1) + timeout -= 1 self.assertFalse(os.path.exists(pidfile), "Found %s" % pidfile) self.assertFalse(testlib.check_pidfile('upsd', pidfile), 'upsd is hung') #subprocess.call(['bash'])