summaryrefslogtreecommitdiff
path: root/core/pacman/pentium4-tests.patch
blob: bf0ee2dade2f280273402e94d726aaa1329637f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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 @@
 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 @@
 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"]