summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/runtime/smart.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oeqa/runtime/smart.py')
-rw-r--r--meta/lib/oeqa/runtime/smart.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/meta/lib/oeqa/runtime/smart.py b/meta/lib/oeqa/runtime/smart.py
new file mode 100644
index 0000000000..8cfacd4602
--- /dev/null
+++ b/meta/lib/oeqa/runtime/smart.py
@@ -0,0 +1,27 @@
1import unittest
2from oeqa.oetest import oeRuntimeTest
3from oeqa.utils.decorators import *
4
5def setUpModule():
6 if not oeRuntimeTest.hasFeature("package-management"):
7 skipModule("Image doesn't have package management feature")
8 if not oeRuntimeTest.hasPackage("smart"):
9 skipModule("Image doesn't have smart installed")
10
11class SmartHelpTest(oeRuntimeTest):
12
13 def test_smart_help(self):
14 status = self.target.run('smart --help')[0]
15 self.assertEqual(status, 0)
16
17class SmartQueryTest(oeRuntimeTest):
18
19 @skipUnlessPassed('test_smart_help')
20 def test_smart_query(self):
21 (status, output) = self.target.run('smart query rpm')
22 self.assertEqual(status, 0, msg="smart query failed, output: %s" % output)
23
24 @skipUnlessPassed('test_smart_query')
25 def test_smart_info(self):
26 (status, output) = self.target.run('smart info rpm')
27 self.assertEqual(status, 0, msg="smart info rpm failed, output: %s" % output)