diff options
author | Erich Eckner <git@eckner.net> | 2019-05-11 12:22:27 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2019-05-11 12:22:27 +0200 |
commit | 478e83f5de579fc84688dc8b61e8d399646b4eb8 (patch) | |
tree | dbd4bf90399c9c5fa26afc8530c1c76eef96e3fd /test | |
parent | 9edfdca7020b64e06ecfd6d6c0f70b500a6ff0e7 (diff) | |
download | pacman-478e83f5de579fc84688dc8b61e8d399646b4eb8.tar.xz |
tests should change "i686" to "pentium4" if sse2 is available
Diffstat (limited to 'test')
-rw-r--r-- | test/pacman/tests/upgrade082.py | 12 | ||||
-rw-r--r-- | test/pacman/tests/upgrade083.py | 12 |
2 files changed, 24 insertions, 0 deletions
diff --git a/test/pacman/tests/upgrade082.py b/test/pacman/tests/upgrade082.py index 0bdbdf71..8c30ec32 100644 --- a/test/pacman/tests/upgrade082.py +++ b/test/pacman/tests/upgrade082.py @@ -3,6 +3,18 @@ self.description = "Install a package (correct architecture, auto)" import os machine = os.uname()[4] +if machine == 'i686': + import re + fo = open('/proc/cpuinfo') + for line in fo: + name_value = [s.strip() for s in line.split(':', 1)] + if len(name_value) != 2: + continue + name, value = name_value + if name == "flags": + if re.match(r'.*?\bsse2\b', value) is not None: + machine = 'pentium4' + p = pmpkg("dummy") p.files = ["bin/dummy", "usr/man/man1/dummy.1"] diff --git a/test/pacman/tests/upgrade083.py b/test/pacman/tests/upgrade083.py index 097ae02c..7195e35b 100644 --- a/test/pacman/tests/upgrade083.py +++ b/test/pacman/tests/upgrade083.py @@ -3,6 +3,18 @@ self.description = "Install a package (wrong architecture, auto)" import os machine = os.uname()[4] +if machine == 'i686': + import re + fo = open('/proc/cpuinfo') + for line in fo: + name_value = [s.strip() for s in line.split(':', 1)] + if len(name_value) != 2: + continue + name, value = name_value + if name == "flags": + if re.match(r'.*?\bsse2\b', value) is not None: + machine = 'pentium4' + p = pmpkg("dummy") p.files = ["bin/dummy", "usr/man/man1/dummy.1"] |