summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest
diff options
context:
space:
mode:
authorAlexander Kanavin <alexander.kanavin@linux.intel.com>2017-03-16 15:19:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-17 16:53:04 +0000
commit2b77735c72cb5100dbd850e79d4f639e82629842 (patch)
tree859dde4d0a69b2392ad36d8278dc92d1d8b23554 /meta/lib/oeqa/selftest
parentcb05db0d034494ab2dfba6797225d18ac7b6a105 (diff)
downloadpoky-2b77735c72cb5100dbd850e79d4f639e82629842.tar.gz
rpm: add support for remote package feeds via PACKAGE_FEED_URIS variable
I've used a previous patch (which was never merged) by Humberto Ibarra <humberto.ibarra.lopez@intel.com> as a model for how to do runtime testing of this feature (e.g. we need to boot an image, run dnf on it, and check that it is indeed able to access the remote repo over http). Here's his original commit message: ===== Testing that feeds specified with PACKAGE_FEED_URIS var are set correctly has two parts. First a build with this var set is required, and then smart update needs to be issued in the running taget. The previous is not a common selftest practice because this is a simple test, but requires building and running a specific image, which takes a lot of time. testimage is not a good fit either, since the images tested there do not have the PACKAGE_FEED_URIS var set. For this test, the runtime-test module is being used, which is a selftest module but runs a testimage command. The var and test environment were set in runtime-perf.py and the actual test is done in a new testcase added to meta-selftest layer. ===== [YOCTO #10872] (From OE-Core rev: 3a9e2fdef9316e24b52ce99ac355fc2b09786c72) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r--meta/lib/oeqa/selftest/runtime-test.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/lib/oeqa/selftest/runtime-test.py b/meta/lib/oeqa/selftest/runtime-test.py
index e8b483d7f8..171a37329f 100644
--- a/meta/lib/oeqa/selftest/runtime-test.py
+++ b/meta/lib/oeqa/selftest/runtime-test.py
@@ -108,14 +108,21 @@ class TestImage(oeSelfTest):
108 Summary: Check install packages functionality for testimage/testexport. 108 Summary: Check install packages functionality for testimage/testexport.
109 Expected: 1. Import tests from a directory other than meta. 109 Expected: 1. Import tests from a directory other than meta.
110 2. Check install/uninstall of socat. 110 2. Check install/uninstall of socat.
111 3. Check that remote package feeds can be accessed
111 Product: oe-core 112 Product: oe-core
112 Author: Mariano Lopez <mariano.lopez@intel.com> 113 Author: Mariano Lopez <mariano.lopez@intel.com>
114 Author: Alexander Kanavin <alexander.kanavin@intel.com>
113 """ 115 """
114 if get_bb_var('DISTRO') == 'poky-tiny': 116 if get_bb_var('DISTRO') == 'poky-tiny':
115 self.skipTest('core-image-full-cmdline not buildable for poky-tiny') 117 self.skipTest('core-image-full-cmdline not buildable for poky-tiny')
116 118
117 features = 'INHERIT += "testimage"\n' 119 features = 'INHERIT += "testimage"\n'
118 features += 'TEST_SUITES = "ping ssh selftest"\n' 120 features += 'TEST_SUITES = "ping ssh selftest"\n'
121 # We don't yet know what the server ip and port will be - they will be patched
122 # in at the start of the on-image test
123 features += 'PACKAGE_FEED_URIS = "http://bogus_ip:bogus_port"\n'
124 features += 'EXTRA_IMAGE_FEATURES += "package-management"\n'
125 features += 'PACKAGE_CLASSES = "package_rpm"'
119 self.write_config(features) 126 self.write_config(features)
120 127
121 # Build core-image-sato and testimage 128 # Build core-image-sato and testimage