]> code.ossystems Code Review - openembedded-core.git/commitdiff
lib/oeqa: fix dependecy check
authorStefan Stanacar <stefanx.stanacar@intel.com>
Sat, 13 Jul 2013 14:57:56 +0000 (17:57 +0300)
committerSaul Wold <sgw@linux.intel.com>
Mon, 15 Jul 2013 17:29:27 +0000 (10:29 -0700)
Adds missing skip for smart test and fix the check (which I somehow broke
a while ago).

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/lib/oeqa/runtime/smart.py
meta/lib/oeqa/utils/decorators.py

index 8cfacd4602fd2c769e22aff9f7adf2b290ffae85..0b03a30a3fc97bb7375a4351ae784db13f21915d 100644 (file)
@@ -10,6 +10,7 @@ def setUpModule():
 
 class SmartHelpTest(oeRuntimeTest):
 
+    @skipUnlessPassed('test_ssh')
     def test_smart_help(self):
         status = self.target.run('smart --help')[0]
         self.assertEqual(status, 0)
index adec65eb44a3db45dd9e5716ee0f821e7cf1a604..e0ca6fd19ec711feb543bf76f7ccd1a885d3bf9d 100644 (file)
@@ -41,7 +41,9 @@ class skipUnlessPassed(object):
 
     def __call__(self,f):
         def wrapped_f(*args):
-            if self.testcase in (oeRuntimeTest.testSkipped, oeRuntimeTest.testFailures, oeRuntimeTest.testErrors):
+            if self.testcase in oeRuntimeTest.testSkipped or \
+                    self.testcase in  oeRuntimeTest.testFailures or \
+                    self.testcase in oeRuntimeTest.testErrors:
                 raise unittest.SkipTest("Testcase dependency not met: %s" % self.testcase)
             f(*args)
         wrapped_f.__name__ = f.__name__