Skip to contentSkip to conversation

oeqa/esdk/devtool: Drop OETestDepends usage

PATCH New Richard Purdie 1 participant 3 messages Aug 10, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 oeqa/esdk/devtool: Drop OETestDepends usage

OETestDepends doesn't work with parallelism and in this case we don't really need this dependency, it would just short out some tests quickly in the rare case the esdk environment was broken.

Currently this is masking tests which is a much worse problem and we can't make OETestDepends work reliably with parallelism so drop the dependencies.

---
 meta/lib/oeqa/sdkext/cases/devtool.py | 8 --------
 1 file changed, 8 deletions(-)
meta/lib/oeqa/sdkext/cases/devtool.py +0 -8
index ea9051710ae..0860e8d17cf 100644
@@ -6,7 +6,6 @@ import shutil
 import subprocess
 
 from oeqa.sdkext.case import OESDKExtTestCase
-from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.oeid import OETestID
 from oeqa.utils.httpserver import HTTPService
 
@@ -45,28 +44,23 @@ class DevtoolTest(OESDKExtTestCase):
         self.assertEqual(output.startswith(self.tc.sdk_dir), True, \
             msg="Seems that devtool isn't the eSDK one: %s" % output)
 
-    @OETestDepends(['test_devtool_location'])
     def test_devtool_add_reset(self):
         self._run('devtool add myapp %s' % self.myapp_dst)
         self._run('devtool reset myapp')
 
     @OETestID(1605)
-    @OETestDepends(['test_devtool_location'])
     def test_devtool_build_make(self):
         self._test_devtool_build(self.myapp_dst)
 
     @OETestID(1606)
-    @OETestDepends(['test_devtool_location'])
     def test_devtool_build_esdk_package(self):
         self._test_devtool_build_package(self.myapp_dst)
 
     @OETestID(1607)
-    @OETestDepends(['test_devtool_location'])
     def test_devtool_build_cmake(self):
         self._test_devtool_build(self.myapp_cmake_dst)
 
     @OETestID(1608)
-    @OETestDepends(['test_devtool_location'])
     def test_extend_autotools_recipe_creation(self):
         req = 'https://github.com/rdfa/librdfa'
         recipe = "librdfa"
@@ -78,7 +72,6 @@ class DevtoolTest(OESDKExtTestCase):
             self._run('devtool reset %s' % recipe)
 
     @OETestID(1609)
-    @OETestDepends(['test_devtool_location'])
     def test_devtool_kernelmodule(self):
         docfile = 'https://github.com/umlaeute/v4l2loopback.git'
         recipe = 'v4l2loopback-driver'
@@ -89,7 +82,6 @@ class DevtoolTest(OESDKExtTestCase):
             self._run('devtool reset %s' % recipe)
 
     @OETestID(1610)
-    @OETestDepends(['test_devtool_location'])
     def test_recipes_for_nodejs(self):
         package_nodejs = "npm://registry.npmjs.org;name=winston;version=2.2.0"
         self._run('devtool add %s ' % package_nodejs)
Signature · 1 line
2.17.1
#1 lore raw

PATCH 2/3 sstate: Remove DEPLOY_DIR_IMAGE from SSTATE_DUPWHITELIST

Replace the generic whitelist entry with entries for the three specific 'problem' cases in OE-Core. This means the general DEPLOY_DIR_IMAGE entry doesn't mask problems for others as was recently encoutered by users reported on irc. In the whitelisted cases they occur only in multilib builds and the files are identical.

---
 meta/classes/sstate.bbclass | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/classes/sstate.bbclass +5 -1
index 6743becf071..9927c76596e 100644
@@ -25,7 +25,7 @@ PV[vardepvalue] = "${PV}"
 SSTATE_EXTRAPATH[vardepvalue] = ""
 
 # For multilib rpm the allarch packagegroup files can overwrite (in theory they're identical)
-SSTATE_DUPWHITELIST = "${DEPLOY_DIR_IMAGE}/ ${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/"
+SSTATE_DUPWHITELIST = "${DEPLOY_DIR}/licenses/ ${DEPLOY_DIR_RPM}/noarch/"
 # Avoid docbook/sgml catalog warnings for now
 SSTATE_DUPWHITELIST += "${STAGING_ETCDIR_NATIVE}/sgml ${STAGING_DATADIR_NATIVE}/sgml"
 # sdk-provides-dummy-nativesdk and nativesdk-buildtools-perl-dummy overlap for different SDKMACHINE
@@ -33,6 +33,10 @@ SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/sdk_provides_dummy_nativesdk/ ${DEPLOY
 SSTATE_DUPWHITELIST += "${DEPLOY_DIR_RPM}/buildtools_dummy_nativesdk/ ${DEPLOY_DIR_IPK}/buildtools-dummy-nativesdk/"
 # Archive the sources for many architectures in one deploy folder
 SSTATE_DUPWHITELIST += "${DEPLOY_DIR_SRC}"
+# ovmf/grub-efi/systemd-boot multilib recipes can generate identical overlapping files
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_IMAGE}/ovmf"
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_IMAGE}/grub-efi"
+SSTATE_DUPWHITELIST += "${DEPLOY_DIR_IMAGE}/systemd-boot"
 
 SSTATE_SCAN_FILES ?= "*.la *-config *_config postinst-*"
 SSTATE_SCAN_CMD ??= 'find ${SSTATE_BUILDDIR} \( -name "${@"\" -o -name \"".join(d.getVar("SSTATE_SCAN_FILES").split())}" \) -type f'
Signature · 1 line
2.17.1
#2 lore raw

PATCH 3/3 libtool-cross: Handle ccache sstate 'infection' issues

In reply to Richard Purdie

On a system without ccache, f you:

INHERIT += "ccache"
bitbake libtool-cross
<remove INHERIT>
bitbake apmd

then it fails due to being unable to find ccache. The references to ccache are coded into libtool-cross but the sstate checksum doesn't reflect this due to the way the class is coded (output should be the same regardless).

The simplest solution is to remove references to ccache from the libtool script. The output then works regardless of whether ccache is present or not. The libtool-cross script is only used in a handful of cases (most of the time its dynamically generated by autoconf) so any performance issue is minor.

---
 meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb | 8 ++++++++
 1 file changed, 8 insertions(+)
meta/recipes-devtools/libtool/libtool-cross_2.4.6.bb +8 -0
index b2683104686..522bf3a0e96 100644
@@ -13,11 +13,19 @@ do_configure_prepend () {
 	rm -f ${STAGING_DATADIR}/aclocal/lt*.m4
 }
 
+#
+# ccache may or may not be INHERITED, we remove references to it so the sstate
+# artefact works on a machine where its not present. libtool-cross isn't used
+# heavily so any performance issue is minor.
+# Find references to LTCC="ccache xxx-gcc" and CC="ccache xxx-gcc"
+#
 do_install () {
 	install -d ${D}${bindir_crossscripts}/
 	install -m 0755 ${HOST_SYS}-libtool ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
 	sed -e 's@^\(predep_objects="\).*@\1"@' \
 	    -e 's@^\(postdep_objects="\).*@\1"@' \
+	    -e 's@^CC="ccache.@CC="@' \
+	    -e 's@^LTCC="ccache.@LTCC="@' \
 	    -i ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
 	sed -i '/^archive_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
 	sed -i '/^archive_expsym_cmds=/s/\-nostdlib//g' ${D}${bindir_crossscripts}/${HOST_SYS}-libtool
Signature · 1 line
2.17.1