summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-02 15:24:45 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-02 16:09:42 +0000
commitea2fd77ba5c5482dac4682381d82a76cc30391fa (patch)
treeb7355d86eddab8184ad4614a5a8e54dfa8b43023
parent7ddf8e19c4f9a90710397d785fc992115f8c71bb (diff)
downloadpoky-ea2fd77ba5c5482dac4682381d82a76cc30391fa.tar.gz
testsdk: Use auto.conf instead of local.conf to set SSTATE_MIRROR
The local.conf file can get overritten and changed by the SDK so (ab)use auto.conf instead to ensure our configuration tweaks get applied. Also ensure we append to any other configured SSTATE_MIRROR variable that already exists. (From OE-Core rev: 444a71b1c2d8f86fc4c35c8ff8e92bcbbe646b75) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/testsdk.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/testsdk.bbclass b/meta/classes/testsdk.bbclass
index 0e6949ed9f..d566b43ba0 100644
--- a/meta/classes/testsdk.bbclass
+++ b/meta/classes/testsdk.bbclass
@@ -154,8 +154,9 @@ def testsdkext_main(d):
154 154
155 # Use our own SSTATE_DIR and DL_DIR so that updates to the eSDK come from our sstate cache 155 # Use our own SSTATE_DIR and DL_DIR so that updates to the eSDK come from our sstate cache
156 # and we don't spend hours downloading kernels for the kernel module test 156 # and we don't spend hours downloading kernels for the kernel module test
157 with open(os.path.join(sdk_dir, 'conf', 'local.conf'), 'a+') as f: 157 # Abuse auto.conf since local.conf would be overwritten by the SDK
158 f.write('SSTATE_MIRRORS = "file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR')) 158 with open(os.path.join(sdk_dir, 'conf', 'auto.conf'), 'a+') as f:
159 f.write('SSTATE_MIRRORS += " \\n file://.* file://%s/PATH"\n' % test_data.get('SSTATE_DIR'))
159 f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR')) 160 f.write('SOURCE_MIRROR_URL = "file://%s"\n' % test_data.get('DL_DIR'))
160 f.write('INHERIT += "own-mirrors"') 161 f.write('INHERIT += "own-mirrors"')
161 162