]> code.ossystems Code Review - openembedded-core.git/commitdiff
oetest.py: Fix problem when there is more than one json file for package extraction
authorMariano Lopez <mariano.lopez@linux.intel.com>
Wed, 13 Jul 2016 11:47:09 +0000 (11:47 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 20 Jul 2016 10:08:16 +0000 (11:08 +0100)
This allow to have more than one test to have json file in order
to install packages in the DUT without using a package manager.

[YOCTO #9926]

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/oetest.py

index 4a740fb53f45faa378a688a969472f3785f3493e..e63ca561653f486508f55f6e520f2d035d3618d4 100644 (file)
@@ -441,12 +441,9 @@ class RuntimeTestContext(TestContext):
 
     def extract_packages(self):
         """
-        Find and extract packages that will be needed during runtime.
+        Find packages that will be needed during runtime.
         """
 
-        needed_packages = {}
-        extracted_path = self.d.getVar("TEST_EXTRACTED_DIR", True)
-        packaged_path = self.d.getVar("TEST_PACKAGED_DIR", True)
         modules = self.getTestModules()
         bbpaths = self.d.getVar("BBPATH", True).split(":")
 
@@ -454,6 +451,15 @@ class RuntimeTestContext(TestContext):
             json_file = self._getJsonFile(module)
             if json_file:
                 needed_packages = self._getNeededPackages(json_file)
+                self._perform_package_extraction(needed_packages)
+
+    def _perform_package_extraction(self, needed_packages):
+        """
+        Extract packages that will be needed during runtime.
+        """
+
+        extracted_path = self.d.getVar("TEST_EXTRACTED_DIR", True)
+        packaged_path = self.d.getVar("TEST_PACKAGED_DIR", True)
 
         for key,value in needed_packages.items():
             packages = ()