aboutsummaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-01 01:12:10 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-01 23:27:11 +0000
commit51d6f19fa80be07e71ee14d3b3d273d11074d52c (patch)
tree2ca259c7aa02cdcbc4fa4545fc20aaebdf78c840 /meta
parentf3b54c86b5dde27a348d905fd3fce031f66a9cb8 (diff)
downloadopenembedded-core-contrib-51d6f19fa80be07e71ee14d3b3d273d11074d52c.tar.gz
testsdk: Handle minimal eSDK and avoid download costs
When using a minimal eSDK, testing currently fails as the sdk isn't populated. We therefore setup the eSDK under test to point at local sstate and execute a command to ensure the toolchain is populated since most of the tests depend on this being present. At the same time, add in a link to DL_DIR through own-mirrors so that tests which fetch source (e.g. the kernel module one) can use the local stash. This cuts test execution of the kernel module test from 2000s to 120s. We did try using DL_DIR directly but that causes uninative issues requiring other workarounds so own-mirrors is neater. Together these fixes unbreak eSDK testing on the autobuilder. (From OE-Core rev: 866b55905eabf93f45c10a08d5b53c459ac4c056) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/testsdk.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 75b40271fa..802e57f55d 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -149,6 +149,17 @@ def testsdkext_main(d):
bb.plain("Extensible SDK testing environment: %s" % s)
sdk_env = sdk_envs[s]
+
+ # Use our own SSTATE_DIR and DL_DIR so that updates to the eSDK come from our sstate cache
+ # and we don't spend hours downloading kernels for the kernel module test
+ with open(os.path.join(sdk_dir, 'conf', 'local.conf'), 'a+') as f:
+ f.write('SSTATE_MIRRORS = "file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR'))
+ f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR'))
+ f.write('INHERIT += "own-mirrors"')
+
+ # We need to do this in case we have a minimal SDK
+ subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % sdk_env, cwd=sdk_dir, shell=True)
+
tc = OESDKExtTestContext(td=test_data, logger=logger, sdk_dir=sdk_dir,
sdk_env=sdk_env, target_pkg_manifest=target_pkg_manifest,
host_pkg_manifest=host_pkg_manifest)