Skip to contentSkip to conversation

improving the ptest section

DISCUSSION Robert P. J. Day 1 participant 1 message Jun 12

lore
Share & tools
lore
#0 lore raw

going over the ptest section in the docs:

https://docs.yoctoproject.org/test-manual/ptest.html

and i can see a couple potential improvements but i'll ask a couple questions first to make sure i did not misunderstand the code and my testing.

first, section 3.1 advises that to add ptests to your image, you
need to add those *two* lines. let's back up a second and consider just the first line:

DISTRO_FEATURES:append = " ptest"

if you add "ptest" to DISTRO_FEATURES, that means that all of the ptest-enabled recipes will build and package their "xxx-ptest" packages and install them under /tmp/deploy/<backend>, correct? but if you stop there, all that means is that your build will have gone to all that trouble, only for no ptests to be installed in your image. and people will think, "why would i do that and then not go on to install those packages in my image?". which is a perfectly reasonable question ... unless that setting had been set for you without you knowing it, which is *exactly* what happens if you build with a DISTRO of "nodistro", since the defaultsetup.conf file in OE-core includes default-distrovars.inc, which includes the line:

  DISTRO_FEATURES_DEFAULTS ?= " \
    acl alsa bluetooth debuginfod ext2 ipv4 ipv6 \
    wifi xattr nfs zeroconf pci 3g nfc x11 vfat seccomp pulseaudio \
    gobject-introspection-data ldconfig opengl ptest multiarch wayland vulkan \
    "

which explains why *my* build created all these ptest packages i did not ask for. so as a first fix, i would explain that to simply *build* all ptest packages, that feature needs to be set, but it *might* already be set depending on your build configuration, so it would be worth mentioning the possibility of *removing* that feature if you don't want it.

and second, in addition to simply installing *all* of the ptest
packages, it should be mentioned how to install only *some* of them, with something like:

IMAGE_INSTALL:append = " fubar-ptest"

those are two immediate improvements i can see. thoughts?

rday