]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
oeqa/runtime/apt dnf opkg: support running from within docker container
authorAndré Draszik <git@andred.net>
Thu, 12 Dec 2019 21:52:12 +0000 (21:52 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Dec 2019 23:22:03 +0000 (23:22 +0000)
If the user specified an http port to use for serving
files, use that instead of a random one. At the same
time, have the http server bind to all interfaces.

Binding to the server_ip might not always be possible,
e.g. in the case of running bitbake / oeqa from within
a docker container. In this case, the ip address is valid
outside the container, but not inside, and hence can't
be bound to. So switch to simply binding to all interfaces.

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/runtime/cases/apt.py
meta/lib/oeqa/runtime/cases/dnf.py
meta/lib/oeqa/runtime/cases/opkg.py

index 74a940d80f9dc5098c8c12dccb1730e85c5dc8be..c5378d90c3b29f9ce190352ca5e92d788d203709 100644 (file)
@@ -22,7 +22,9 @@ class AptRepoTest(AptTest):
     @classmethod
     def setUpClass(cls):
         service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_DEB'], 'all')
-        cls.repo_server = HTTPService(service_repo, cls.tc.target.server_ip, logger=cls.tc.logger)
+        cls.repo_server = HTTPService(service_repo,
+                                      '0.0.0.0', port=cls.tc.target.server_port,
+                                      logger=cls.tc.logger)
         cls.repo_server.start()
 
     @classmethod
index de3759995eb36f9ecf74cb069cf6ab5b47f7ccb8..f40c63026e5e5531bae2fffd7139d7811f1ea88c 100644 (file)
@@ -53,7 +53,8 @@ class DnfRepoTest(DnfTest):
     @classmethod
     def setUpClass(cls):
         cls.repo_server = HTTPService(os.path.join(cls.tc.td['WORKDIR'], 'oe-testimage-repo'),
-                                      cls.tc.target.server_ip, logger=cls.tc.logger)
+                                      '0.0.0.0', port=cls.tc.target.server_port,
+                                      logger=cls.tc.logger)
         cls.repo_server.start()
 
     @classmethod
index 750706161ba53ad72a43ab0adeaffaeb50732451..9cfee1cd886526ec913f0f35cdcf6c47caa05c5d 100644 (file)
@@ -25,7 +25,9 @@ class OpkgRepoTest(OpkgTest):
         if cls.tc.td["MULTILIB_VARIANTS"]:
             allarchfeed = cls.tc.td["TUNE_PKGARCH"]
         service_repo = os.path.join(cls.tc.td['DEPLOY_DIR_IPK'], allarchfeed)
-        cls.repo_server = HTTPService(service_repo, cls.tc.target.server_ip, logger=cls.tc.logger)
+        cls.repo_server = HTTPService(service_repo,
+                                      '0.0.0.0', port=cls.tc.target.server_port,
+                                      logger=cls.tc.logger)
         cls.repo_server.start()
 
     @classmethod