diff options
| author | Dan Streetman <ddstreet@canonical.com> | 2019-12-04 11:59:06 -0500 |
|---|---|---|
| committer | Dan Streetman <ddstreet@canonical.com> | 2019-12-06 09:26:47 -0500 |
| commit | 6ed722e16a508b985f840eb876e5f4b27eb0d148 (patch) | |
| tree | 12c011c1120f496e1f6bdda239ba52aa180d6d88 /debian/tests | |
| parent | f461012f999254cc0fdac9cbb770912ae140611e (diff) | |
LP: #1855009
Diffstat (limited to 'debian/tests')
| -rw-r--r-- | debian/tests/control | 8 | ||||
| -rwxr-xr-x | debian/tests/killswitches-no-urfkill | 6 | ||||
| -rwxr-xr-x | debian/tests/nm.py | 5 | ||||
| -rw-r--r-- | debian/tests/urfkill-integration | 5 | ||||
| -rwxr-xr-x | debian/tests/wpa-dhclient | 5 |
5 files changed, 25 insertions, 4 deletions
diff --git a/debian/tests/control b/debian/tests/control index 22b1b40d..53184f90 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,15 +1,15 @@ Tests: wpa-dhclient Depends: python3, hostapd, dnsmasq-base, wpasupplicant, isc-dhcp-client, iw -Restrictions: needs-root allow-stderr isolation-machine +Restrictions: needs-root allow-stderr isolation-machine skippable Tests: nm.py Depends: python3, dnsmasq-base, isc-dhcp-client, gir1.2-nm-1.0, network-manager, hostapd, iw, python3-dbusmock, python3-netaddr -Restrictions: needs-root isolation-machine +Restrictions: needs-root isolation-machine skippable Tests: killswitches-no-urfkill Depends: network-manager, build-essential, linux-headers-generic, rfkill -Restrictions: needs-root allow-stderr isolation-machine +Restrictions: needs-root allow-stderr isolation-machine skippable Tests: urfkill-integration Depends: network-manager, build-essential, linux-headers-generic, rfkill, urfkill -Restrictions: needs-root allow-stderr isolation-machine +Restrictions: needs-root allow-stderr isolation-machine skippable diff --git a/debian/tests/killswitches-no-urfkill b/debian/tests/killswitches-no-urfkill index ea6f6e90..cb01eb53 100755 --- a/debian/tests/killswitches-no-urfkill +++ b/debian/tests/killswitches-no-urfkill @@ -1,4 +1,10 @@ #!/bin/sh + +if dpkg --print-architecture | grep s390; then + echo "Skipping rfkill tests on s390 (LP: #1855009)" + exit 77 +fi + set -e make -f debian/tests/Makefile fake-rfkill diff --git a/debian/tests/nm.py b/debian/tests/nm.py index e9bb2b6f..7399c4d9 100755 --- a/debian/tests/nm.py +++ b/debian/tests/nm.py @@ -9,6 +9,7 @@ __license__ = 'GPL v2 or later' import sys import os import os.path +import re import time import subprocess import socket @@ -871,6 +872,10 @@ if __name__ == '__main__': sys.stderr.write('This integration test suite needs to be run as root\n') sys.exit(1) + if re.search(b's390', subprocess.run(['dpkg', '--print-architecture'], capture_output=True).stdout): + print("s390 arch has no wireless support, skipping") + sys.exit(77) + # write to stdout, not stderr runner = unittest.TextTestRunner(stream=sys.stdout, verbosity=2) unittest.main(testRunner=runner) diff --git a/debian/tests/urfkill-integration b/debian/tests/urfkill-integration index 09e194ed..034bdecc 100644 --- a/debian/tests/urfkill-integration +++ b/debian/tests/urfkill-integration @@ -1,5 +1,10 @@ #!/bin/sh +if dpkg --print-architecture | grep s390; then + echo "Skipping rfkill tests on s390 (LP: #1855009)" + exit 77 +fi + set -e echo "+++ Building / adding fake-rfkill.ko" diff --git a/debian/tests/wpa-dhclient b/debian/tests/wpa-dhclient index a9235f97..a14abb61 100755 --- a/debian/tests/wpa-dhclient +++ b/debian/tests/wpa-dhclient @@ -8,6 +8,7 @@ __license__ = 'GPL v2 or later' import sys import os import os.path +import re import time import subprocess import unittest @@ -234,6 +235,10 @@ group=CCMP''' % SSID, self.assertRegex(out, 'inet6 fe80::ff:fe00:[0-9a-z:]+/64 scope link') +if re.search(b's390', subprocess.run(['dpkg', '--print-architecture'], capture_output=True).stdout): + print("s390 arch has no wireless support, skipping") + sys.exit(77) + # write to stdout, not stderr runner = unittest.TextTestRunner(stream=sys.stdout, verbosity=2) unittest.main(testRunner=runner) |