diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-01 15:16:44 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-01 16:11:40 +0000 |
commit | 7606f05e48ad2e31650e3a56bfcd04b4fbfad1e3 (patch) | |
tree | 09b1e2fe5a03d983f5b2e6a0a85a566a4ca99408 /meta/lib/oeqa/selftest | |
parent | 6e4ae81d76c5a61e7603ff4ca94452a6e724c244 (diff) | |
download | openembedded-core-7606f05e48ad2e31650e3a56bfcd04b4fbfad1e3.tar.gz openembedded-core-7606f05e48ad2e31650e3a56bfcd04b4fbfad1e3.tar.bz2 openembedded-core-7606f05e48ad2e31650e3a56bfcd04b4fbfad1e3.zip |
oeqa/selftest: Drop http sstate sharing
Using httpServer from python for sharing sstate is known to be buggy, it can't
cope with the number/type of requests coming from bitbake and quietly fails
to share files.
This causes intermittent build failures which are hard to debug. We can
use a file:// url for the sstate mirror instead, removing the need for
the http server.
The sdk-update test is simply dropped since the SDK is never published
to this location and hence it would never have any update. Its equiavalent
to pointing at an empty web server. There is a better eSDK update test in
testsdk so rather than improve this one, lets drop it and concentrate on
the one there.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/selftest')
-rw-r--r-- | meta/lib/oeqa/selftest/eSDK.py | 55 |
1 files changed, 16 insertions, 39 deletions
diff --git a/meta/lib/oeqa/selftest/eSDK.py b/meta/lib/oeqa/selftest/eSDK.py index a66ff92140..1596c6e9d6 100644 --- a/meta/lib/oeqa/selftest/eSDK.py +++ b/meta/lib/oeqa/selftest/eSDK.py @@ -9,7 +9,6 @@ import oeqa.utils.ftools as ftools from oeqa.utils.decorators import testcase from oeqa.selftest.base import oeSelfTest from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars -from oeqa.utils.httpserver import HTTPService class oeSDKExtSelfTest(oeSelfTest): """ @@ -55,9 +54,6 @@ class oeSDKExtSelfTest(oeSelfTest): @staticmethod def update_configuration(cls, image, tmpdir_eSDKQA, env_eSDK, ext_sdk_path): sstate_dir = os.path.join(os.environ['BUILDDIR'], 'sstate-cache') - cls.http_service = HTTPService(sstate_dir) - cls.http_service.start() - cls.http_url = "http://127.0.0.1:%d" % cls.http_service.port oeSDKExtSelfTest.generate_eSDK(cls.image) @@ -68,51 +64,39 @@ class oeSDKExtSelfTest(oeSelfTest): sstate_config=""" SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" -SSTATE_MIRRORS = "file://.* http://%s/PATH" +SSTATE_MIRRORS = "file://.* file://%s/PATH" CORE_IMAGE_EXTRA_INSTALL = "perl" - """ % cls.http_url + """ % sstate_dir with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f: f.write(sstate_config) @classmethod def setUpClass(cls): - # If there is an exception in setUpClass it will not run tearDownClass - # method and it leaves HTTP server running forever, so we need to be - # sure tearDownClass is run. - try: - cls.tmpdir_eSDKQA = tempfile.mkdtemp(prefix='eSDKQA') + cls.tmpdir_eSDKQA = tempfile.mkdtemp(prefix='eSDKQA') - # Start to serve sstate dir - sstate_dir = get_bb_var('SSTATE_DIR') - cls.http_service = HTTPService(sstate_dir) - cls.http_url = "http://127.0.0.1:%d" % cls.http_service.port - cls.http_service.start() + sstate_dir = get_bb_var('SSTATE_DIR') - cls.image = 'core-image-minimal' - oeSDKExtSelfTest.generate_eSDK(cls.image) + cls.image = 'core-image-minimal' + oeSDKExtSelfTest.generate_eSDK(cls.image) - # Install eSDK - cls.ext_sdk_path = oeSDKExtSelfTest.get_eSDK_toolchain(cls.image) - runCmd("%s -y -d \"%s\"" % (cls.ext_sdk_path, cls.tmpdir_eSDKQA)) + # Install eSDK + cls.ext_sdk_path = oeSDKExtSelfTest.get_eSDK_toolchain(cls.image) + runCmd("%s -y -d \"%s\"" % (cls.ext_sdk_path, cls.tmpdir_eSDKQA)) - cls.env_eSDK = oeSDKExtSelfTest.get_esdk_environment('', cls.tmpdir_eSDKQA) + cls.env_eSDK = oeSDKExtSelfTest.get_esdk_environment('', cls.tmpdir_eSDKQA) - # Configure eSDK to use sstate mirror from poky - sstate_config=""" + # Configure eSDK to use sstate mirror from poky + sstate_config=""" SDK_LOCAL_CONF_WHITELIST = "SSTATE_MIRRORS" -SSTATE_MIRRORS = "file://.* http://%s/PATH" - """ % cls.http_url - with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f: - f.write(sstate_config) - except: - cls.tearDownClass() - raise +SSTATE_MIRRORS = "file://.* file://%s/PATH" + """ % sstate_dir + with open(os.path.join(cls.tmpdir_eSDKQA, 'conf', 'local.conf'), 'a+') as f: + f.write(sstate_config) @classmethod def tearDownClass(cls): shutil.rmtree(cls.tmpdir_eSDKQA) - cls.http_service.stop() @testcase (1602) def test_install_libraries_headers(self): @@ -127,12 +111,5 @@ SSTATE_MIRRORS = "file://.* http://%s/PATH" cmd = "devtool build-image %s" % image oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd) - @testcase(1567) - def test_sdk_update_http(self): - cmd = "devtool sdk-update %s" % self.http_url - oeSDKExtSelfTest.update_configuration(self, self.image, self.tmpdir_eSDKQA, self.env_eSDK, self.ext_sdk_path) - oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd) - self.http_service.stop() - if __name__ == '__main__': unittest.main() |