diff options
Diffstat (limited to 'meta-selftest/lib/oeqa/runtime/cases/selftest.py')
-rw-r--r-- | meta-selftest/lib/oeqa/runtime/cases/selftest.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/meta-selftest/lib/oeqa/runtime/cases/selftest.py b/meta-selftest/lib/oeqa/runtime/cases/selftest.py index 329470f1539..e49d028c32b 100644 --- a/meta-selftest/lib/oeqa/runtime/cases/selftest.py +++ b/meta-selftest/lib/oeqa/runtime/cases/selftest.py @@ -1,5 +1,8 @@ +from oeqa.utils.httpserver import HTTPService + from oeqa.runtime.case import OERuntimeTestCase from oeqa.core.decorator.depends import OETestDepends +from oeqa.runtime.cases.smart import SmartTest class Selftest(OERuntimeTestCase): @@ -29,3 +32,32 @@ class Selftest(OERuntimeTestCase): (status, output) = self.target.run("socat -V") self.assertNotEqual(status, 0, msg="socat is still installed") + +class SmartSelftest(SmartTest): + + @classmethod + def setUpClass(cls): + cls.repolist = [] + cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'rpms'), + cls.tc.target.server_ip) + cls.repo_server.port = 8080 + cls.repo_server.start() + + @classmethod + def tearDownClass(cls): + cls.repo_server.stop() + for repo in cls.repolist: + cls.tc.target.run('smart channel -y --remove %s' % repo) + + @OETestDepends(['ssh.SSHTest.test_ssh']) + def test_verify_package_feeds(self): + """ + Summary: Check correct setting of PACKAGE_FEED_URIS var + Expected: 1. Feeds were correctly set for smart + 2. Update recovers packages from host's repo + Author: Humberto Ibarra <humberto.ibarra.lopez@intel.com> + """ + output = self.smart('update') + import re + new_pkgs = re.match(r".*Channels have [0-9]+ new packages", output, re.DOTALL) + self.assertTrue(new_pkgs is not None, msg = "couldn't update packages") |