Skip to content

Instantly share code, notes, and snippets.

Last active July 13, 2021 07:36
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Yocto simple QA Tests
SUMMARY = "Simple Hello World Cmake application"
SECTION = "examples"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
SRC_URI = "\
file://CMakeLists.txt \
file://hellocmake.cpp \
S = "${WORKDIR}"
inherit cmake qa
# qa.bbclass would ensure that all files in QA_CHECK_FILES exist in the target root filesystem
QA_CHECK_FILES = " file:///usr/bin/program \
file:///usr/lib/;name=library5 \
file:///usr/lib/;name=library \
# Aditionnaly, we could also do some basic check
QA_CHECK_FILES[program.type] = "elf" # Ensure that the elf header is present
QA_CHECK_FILES[program.size] = ">10MB" # Ensure that the file is bigger than 10MB
QA_CHECK_FILES[library5.size] = "<50MB" # Ensure that the file is smaller than 50MB
QA_CHECK_FILES[library.type] = "link" # Ensure that these file is a symbolic link
python do_post_install_qa() {
qa_check_files = d.getVar("QA_CHECK_FILES", expand=True).split()
for file in qa_check_files:
addtask post_install_qa after do_install before do_package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment