summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-05-04 10:47:59 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-06 22:55:02 +0100
commitef98f64b71fb4a2bb6efb59d27ec2245ac9b4ddb (patch)
tree304237333c99f73c6a77a01cec08e9c52410c461 /meta/classes
parentbf669ec97ff1b1ecd37757e06f5368d89d85393f (diff)
downloadpoky-ef98f64b71fb4a2bb6efb59d27ec2245ac9b4ddb.tar.gz
testsdk.bbclass: set PREMIRRORS for kernel to speed up test
Currently if we do a testsdkext task for the image, it would take very long time to finish. The time is mostly spent fetching kernel source via network. We have done some configuration in auto.conf, trying to make use of own-mirrors.bbclass to avoid fetching kernel via network. However, the solution normally does not work. Below is some log from log.do_fetch. DEBUG: Fetcher failure: Unable to find file \ file:///path/to/downloads/git2_git.yoctoproject.org.linux-yocto.git.tar.gz \ anywhere. The tar.gz file is not available. It is generated only if BB_GENERATE_MIRROR_TARBALLS is set to "1". The default value of BB_GENERATE_MIRROR_TARBALLS is "0", and according to the manual, users need choose to set it to "1" only if they are trying to make a source mirror. So generally, this var's value is "0". Anyway, we do need to avoid fetching kernel source from network when doing testsdkext. So set PREMIRRORS in auto.conf to achieve this. After this change, the time reduces from 4209.131s to 1399.436s on my local machine. [YOCTO #12729] (From OE-Core rev: fd18ddb0664f69d77681590774b0123251a98728) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/testsdk.bbclass1
1 files changed, 1 insertions, 0 deletions
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index dba6b0708a..e6e3c74bdb 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -157,6 +157,7 @@ def testsdkext_main(d):
157 f.write('SSTATE_MIRRORS += " \\n file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR')) 157 f.write('SSTATE_MIRRORS += " \\n file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR'))
158 f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR')) 158 f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR'))
159 f.write('INHERIT += "own-mirrors"\n') 159 f.write('INHERIT += "own-mirrors"\n')
160 f.write('PREMIRRORS_prepend = " git://git.yoctoproject.org/.* git://%s/git2/git.yoctoproject.org.BASENAME \\n "\n' % test_data.get('DL_DIR'))
160 161
161 # We need to do this in case we have a minimal SDK 162 # We need to do this in case we have a minimal SDK
162 subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \ 163 subprocess.check_output(". %s > /dev/null; devtool sdk-install meta-extsdk-toolchain" % \