Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

meta-refkit-extra testing #135

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

pohly
Copy link
Contributor

@pohly pohly commented May 2, 2017

We can use oe-selftest to cover some aspects of meta-refkit-extra.

@pohly pohly requested a review from ipuustin May 2, 2017 09:31
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be more consistent to use MIT license, because the layer is overall MIT-licensed. I see that other scripts have been licensed under GPLv2 though.

def setUpLocal(self):
"""
This code is executed before each test method.
It verifies that meta-refkit-extra is not active.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could maybe just skip adding the layer if it is already present?


def test_yocto_compat(self):
"""
Checks for 'Yocto Compatible 2.0' using the yocto-compat-layer.py tool.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could open this up in the comment a bit. What is "Yocto Compatible 2.0" and where is it defined? What does it mean if the script succeeds?

"""
self.enable_refkit_extra()
image = 'refkit-image-common'
packages = 'caffe-imagenet-model python3-pyrealsense opencv'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OpenCV is not coming from this layer. Caffe should bring it in as a dependency.

Build an image with the extra packages mentioned in meta-refkit-extra/doc/computervision.rst.
"""
self.enable_refkit_extra()
image = 'refkit-image-common'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use refkit-image-computervision as the baseline?

@pohly
Copy link
Contributor Author

pohly commented May 3, 2017 via email

@pohly
Copy link
Contributor Author

pohly commented May 3, 2017 via email

@pohly
Copy link
Contributor Author

pohly commented May 3, 2017 via email

@pohly
Copy link
Contributor Author

pohly commented May 3, 2017 via email

@ipuustin
Copy link
Contributor

ipuustin commented May 3, 2017

@pohly : that example doesn't have Caffe, so OpenCV needs to be installed manually. It doesn't hurt to have it in your packages variable, it's just a no-op.

@pohly
Copy link
Contributor Author

pohly commented May 3, 2017 via email

@ipuustin
Copy link
Contributor

ipuustin commented May 3, 2017

@pohly : it should work with refkit-image-common too. I was sort of expecting computer vision components to be run on refkit-image-computervision, but that was maybe a false assumption.

@ipuustin
Copy link
Contributor

ipuustin commented May 3, 2017

Ok .This PR looks good to me.

@mythi
Copy link
Contributor

mythi commented May 9, 2017

@pohly this has conflicts after my secureboot selftests were added. can you resolve that? I'd like to see re-testing with this to see how much time is spent in post-selftests after this.

@pohly
Copy link
Contributor Author

pohly commented May 11, 2017 via email

@mythi
Copy link
Contributor

mythi commented May 11, 2017 via email

@refkit-ci
Copy link

Can one of the admins verify this patch?

pohly added 12 commits June 17, 2017 20:57
The new "bbappends" hierarchy can be used to provide .bbappends for
recipes in layers which may or may not be present. This relies on the
BBFILES_DYNAMIC support in bitbake master.

The complete hierarchy for all layers that are currently used by the
refkit distro is set up in advance with empty directories where
.bbappends need to go, to make it easier for developers to add
.bbappends correctly.

.bbappends outside of the "bbappends" hierarchy are ignored.

While technically not required because OE-core is a hard dependency,
also hosting the .bbappends that modified OE-core under the new
"bbappends" hierarchy makes more sense (all modifications to other
layers in one place).

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Several config changes were in refkit-config.inc merely because we
couldn't use .bbappends for layers other than OE-core. Now we can
make the changes in optional .bbappends.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
We had to use "inherit" to include optional changes. Now "require" is
also supported without parameter, so we can use that instead of
abusing the class inheritance mechanism.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Cooperation of ConnMan and systemd is getting enhanced in OE-core
"systemd: enable resolved and networkd" by introducing additional
symlinks.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Several components are known to have problems (for example, upm =
eclipse-upm/upm#573 and nodejs) with
gcc7. We have to continue using gcc 6.x until those problems have been
sorted out.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
We cannot guarantee that all layers actually work with OE-core master
and its Poky distro. For example, when OE-core switched to gcc7,
nodejs and upm failed to build.

Therefore we now limit testing in that build configuration to OE-core
and meta-refkit-core, without any of the additional layers.

As an additional benefit, the test now ensures that meta-refkit-core
is actually usable for image building and booting when just using
OE-core.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
gcc7 correctly errors out because the if check does not make
sense (using enums in boolean context).

An upm version update might also make sense; for now the goal is
to get the code ready for OE-core master with gcc7 with minimal
changes.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
The new OE-core master has its own distrooverrides.bbclass with a
slightly different API (different variable for listing overrides, all
overrides have a df- for "distro feature" prefix).

* openembedded-core b51383e...1d9a88f (28):
  > ovmf: fix secureboot PACKAGECONFIG + OpenSSL update
  > package_ipk: Clean up Source entry in ipk packages
  > mtools-native: fix Upstream-Status
  > package_manager: flush installed_pkgs file before oe-pkgdata-util uses it
  > distrooverrides.bbclass: DISTRO_FEATURES as overrides
  > Revert "bitbake.conf: DISTRO_FEATURES as overrides"
  > python-3.5: Move bz2.py, lzma.py and _compression.py from python3-misc to python3-compression
  > attr: Fix build failure when image includes man-pages pkg
  > externalsrc: verify that EXTERNALSRC/EXTERNALSRC_BUILD are absolute paths
  > adwaita-icon-theme: add a patch to speed up the do_install() task
  > runqemu: change terminal settings for valid tty's
  > grub: switch from ftp to https
  > libid3tag: switch from ftp to http
  > libglu: switch from ftp to https
  > mesa: switch from ftp to https
  > mesa-demos: switch from ftp to https
  > dhcp: switch from ftp to http
  > libpcre: switch from ftp to https
  > image.bbclass: fix setting of vardeps flag
  > image.bbclass: improve setup of flags
  > image.bbclass: cleanup: add new variable "task"
  > staging.bbclass: fix typo
  > connman: correct the systemd boot in read only rootfs
  > systemd: enable resolved and networkd
  > selftest/sstatetests: Fix potential failure on uniprocessor machines
  > gcc_7.1.bb: disable thumb on armv5t
  > gcc: Add recipes for gcc-7
  > ovmf: Update to latest

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
The helper function makes the intention of the code more explicit.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
The docstring is only special when it appears directly at
the start of the method body.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
It is useful to run signature checks separately from the slower image
build tests. "bitbake -r refkit_poky" still runs both, as before, but
now refkit_poky.TestRefkitPokySignatures and
refkit_poky.TestRefkitPokyBuilds can be used to run those subsets of
the tests.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Our CI system does not enable the layer by default to avoid tainting
"normal" builds. However, we need to ensure that the extra content at
least continues to build.

This can be done in a meta-refkit selftest which adds the extra layer
as needed and removes it again. This is sub-optimal because it adds a
long-running test with no output while the test runs; extending the CI
setup so that it covers different build configurations would be
better. But for now the selftest is better than nothing.

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Only active layers were tested so far. We explicitly
have look for inactive ones (like meta-refkit-extra) and
also add a compat test for them.

This currently fails, because meta-refkit-extra unconditionally
changes glog:

meta-refkit-extra/recipes-convnet/glog/glog_%.bbappend:DEPENDS += "gflags"

TODO: do we want the layer to be Yocto Compatible 2.0?

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
@pohly pohly force-pushed the meta-refkit-extra-testing branch from c728c2f to 0cc5141 Compare June 18, 2017 20:33
@pohly
Copy link
Contributor Author

pohly commented Jun 18, 2017

Rebased on top of PR #184.

The yocto-compat-layer.py test is now in refkit_poky.py. However, since also software layers are checked for signature changes now, meta-refkit-extra does not pass anymore (due to glog_%.bbappend:DEPENDS += "gflags").

Is that perhaps a change that we want in meta-refkit-core under a df-refkit-config condition? It would also avoid some recompilation when switching between building without and with the layer.

I've not finished the actual build test locally. Let's see whether it works in the CI...

@ipuustin
Copy link
Contributor

It's sort of ironic that one of the key reasons we put the extra packages to meta-refkit-extra layer (instead of just having a recipes-extra or similar) was the ability to alter distro and build configuration. :-) Should we instead define a new distro feature (df-refkit-extra-config?) in the extras layer and then make the configuration depend on that? The idea was AFAIK allow recompiling stuff when the extras layer is added.

@pohly
Copy link
Contributor Author

pohly commented Jun 19, 2017 via email

@ipuustin
Copy link
Contributor

Using PACKAGECONFIG would of course be clearer. Many software components change their build depending of what optional packages they can auto-detect during configure. Before RSS this was a clear bug, nowadays it's bit murkier because we can control the available packages.

Glog is coming from meta-openembedded. I don't really know why it's configured there the way it is configured. It probably isn't used by anything else than caffe? The real question is if we want to move configuration of packages used by meta-refkit-extra to meta-refkit-core, which creates a soft dependency (the build configuration is different because meta-refkit-extra might be included).

@ipuustin
Copy link
Contributor

This PR could also be rebased on master.

@pohly
Copy link
Contributor Author

pohly commented Jun 20, 2017 via email

@ipuustin
Copy link
Contributor

That's what I meant with "soft dependency". We are carrying a configuration change in -core which is not needed by anything. If there was no "soft dependency", -core wouldn't need to know about glog at all. A similar case would be adding a bunch of different kernel modules to all images because someone in -extra might need them in some configuration. It's not a real dependency, but still causing dependent changes in -core.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants