Blob Blame History Raw
From afb51d4969fde294fcc9846548c2950cfabf2935 Mon Sep 17 00:00:00 2001
From: Michel Alexandre Salim <salimma@fedoraproject.org>
Date: Mon, 19 Nov 2012 14:00:33 +0700
Subject: [PATCH] testsolver/testDiagnostics: set required CPU explicitly

One of the tests (line 415) assume the host CPU to be x86_64, and does
not explicitly override the CPU field of the Requirements object. This
causes an assertion error on other architectures, as the expected error
message is only displayed if the host CPU is x86_64.

By manually setting r.cpu = 'x86_64', the test works even on other
archs.
---
 tests/testsolver.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/testsolver.py b/tests/testsolver.py
index 3c7f78d..ceee5ee 100755
--- a/tests/testsolver.py
+++ b/tests/testsolver.py
@@ -440,6 +440,7 @@ class TestSolver(BaseTest):
 		impl = self.config.iface_cache.get_feed(diag_uri).implementations['diag-5']
 		r = Requirements(top_uri)
 		r.os = 'Windows'
+		r.cpu = 'x86_64'
 		self.assertEqual("There is no possible selection using Diagnostics 5.\n"
 				 "Can't find all required implementations:\n"
 				 "- http://localhost/diagnostics.xml -> (problem)\n"
-- 
1.8.0