summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2014-06-24 17:03:23 (GMT)
committerDavid Cantrell <dcantrell@redhat.com>2014-06-24 17:06:13 (GMT)
commitc48b12302f55c23b77a6670d975aebb74b18e20f (patch)
tree2675e93a988b039b5ddbf6243abd250a6840de15
parent05fa42d7cf2c7eea4e8ecc15236a1f42c783d976 (diff)
downloadpyparted-master.zip
pyparted-master.tar.gz
pyparted-master.tar.xz
Handle running the test suite on armv7l hosts.HEADmaster
For the ARM support, we have been using the 'aarch64' name, but some of the build systems we are encountering give us 'armv7l' when we call platform.machine() in Python. Handle armv7l in the same manner. (cherry picked from commit 9086315eed62edc83a895ac606c4c80ddea6d878)
-rw-r--r--src/parted/__init__.py7
-rwxr-xr-xtests/test_parted_parted.py1
2 files changed, 5 insertions, 3 deletions
diff --git a/src/parted/__init__.py b/src/parted/__init__.py
index b93e16b..363bc72 100644
--- a/src/parted/__init__.py
+++ b/src/parted/__init__.py
@@ -287,7 +287,8 @@ archLabels = {'i386': ['msdos', 'gpt'],
'ppc64': ['msdos', 'mac', 'amiga', 'gpt'],
'ppc64le': ['msdos', 'gpt'],
'x86_64': ['msdos', 'gpt'],
- 'aarch64': ['msdos', 'gpt']}
+ 'aarch64': ['msdos', 'gpt'],
+ 'armv7l': ['msdos', 'gpt']}
# Adapted from:
# http://stackoverflow.com/questions/922550/how-to-mark-a-global-as-deprecated-in-python
@@ -324,9 +325,9 @@ def Deprecated(mod, deprecated=None):
__archLabels = (('amiga', 'ppc(64)?$'),
('bsd', 'alpha$'),
('dasd', 's390x?$'),
- ('gpt', 'i[3-6]86$|x86_64$|ia64$|ppc(64|64le)?$|aarch64$'),
+ ('gpt', 'i[3-6]86$|x86_64$|ia64$|ppc(64|64le)?$|aarch64$|armv7l$'),
('mac', 'ppc(64)?$'),
- ('msdos', 'i[3-6]86$|x86_64$|s390x?$|alpha$|ia64$|ppc(64|64le)?$|aarch64$'),
+ ('msdos', 'i[3-6]86$|x86_64$|s390x?$|alpha$|ia64$|ppc(64|64le)?$|aarch64$|armv7l$'),
('sun', 'sparc(64)?$'))
def getLabels(arch=None):
diff --git a/tests/test_parted_parted.py b/tests/test_parted_parted.py
index 6ebc7e5..b5855a6 100755
--- a/tests/test_parted_parted.py
+++ b/tests/test_parted_parted.py
@@ -61,6 +61,7 @@ class GetLabelsTestCase(unittest.TestCase):
self.assertSetEqual(parted.getLabels('alpha'), {'bsd', 'msdos'})
self.assertSetEqual(parted.getLabels('ia64'), {'gpt', 'msdos'})
self.assertSetEqual(parted.getLabels('aarch64'), {'gpt', 'msdos'})
+ self.assertSetEqual(parted.getLabels('armv7l'), {'gpt', 'msdos'})
class GetDeviceTestCase(RequiresDeviceNode):
def runTest(self):