[PKG-Openstack-devel] Bug#898733: python-pyeclib: dep8 test updates to account for libisal2 unavailable on non-amd64

Corey Bryant corey.bryant at canonical.com
Tue May 15 15:16:08 BST 2018


Package: python-pyeclib
Version: 1.5.0-2
Severity: normal
Tags: patch
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu cosmic ubuntu-patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * d/tests/*: Don't run encode/decode tests for isa_* ec types on non-amd64
    architures because libisal2 is not available for non-amd64 architectures.


Thanks for considering the patch.


-- System Information:
Debian Release: buster/sid
  APT prefers cosmic
  APT policy: (500, 'cosmic'), (500, 'bionic-security')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-20-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
-------------- next part --------------
diff -Nru python-pyeclib-1.5.0/debian/tests/control python-pyeclib-1.5.0/debian/tests/control
--- python-pyeclib-1.5.0/debian/tests/control	2018-05-14 07:01:11.000000000 -0400
+++ python-pyeclib-1.5.0/debian/tests/control	2018-05-15 10:13:11.000000000 -0400
@@ -24,17 +24,17 @@
 # ISA-L RS VAND
 Test-Command: python debian/tests/encode-decode.py isa_l_rs_vand
 Depends: python-pyeclib,
-         libisal2,
+         libisal2 [amd64],
 
 Test-Command: python3 debian/tests/encode-decode.py isa_l_rs_vand
 Depends: python3-pyeclib,
-         libisal2,
+         libisal2 [amd64],
 
 # ISA-L RS Cauchy
 Test-Command: python debian/tests/encode-decode.py isa_l_rs_cauchy
 Depends: python-pyeclib,
-         libisal2,
+         libisal2 [amd64],
 
 Test-Command: python3 debian/tests/encode-decode.py isa_l_rs_cauchy
 Depends: python3-pyeclib,
-         libisal2,
+         libisal2 [amd64],
diff -Nru python-pyeclib-1.5.0/debian/tests/encode-decode.py python-pyeclib-1.5.0/debian/tests/encode-decode.py
--- python-pyeclib-1.5.0/debian/tests/encode-decode.py	2018-05-14 07:01:11.000000000 -0400
+++ python-pyeclib-1.5.0/debian/tests/encode-decode.py	2018-05-15 10:13:11.000000000 -0400
@@ -1,20 +1,26 @@
 from __future__ import print_function
+import platform
 from pyeclib.ec_iface import ECDriver
 import sys
 
-input = b'test'
+# libisal2 is not available for non-amd64 architectures
+arch = platform.machine()
+if sys.argv[1].startswith('isa_') and arch != 'x86_64':
+    print("Skipping {} test for {} architecture".format(sys.argv[1], arch))
+else:
+    input = b'test'
 
-# Init
-print("init:", end=" ")
-ec = ECDriver(k=3, m=3, hd=3, ec_type=sys.argv[1])
-print("OK")
+    # Init
+    print("init:", end=" ")
+    ec = ECDriver(k=3, m=3, hd=3, ec_type=sys.argv[1])
+    print("OK")
 
-# Encode
-print("encode:", end=" ")
-fragments = ec.encode(input)
-print("OK")
+    # Encode
+    print("encode:", end=" ")
+    fragments = ec.encode(input)
+    print("OK")
 
-# Decode
-print("decode:", end=" ")
-assert ec.decode(fragments[0:ec.k]) == input
-print("OK")
+    # Decode
+    print("decode:", end=" ")
+    assert ec.decode(fragments[0:ec.k]) == input
+    print("OK")


More information about the Openstack-devel mailing list