Skip to content

Add recipe for Yocto ptests & run in GitHub Actions CI#7

Draft
obbardc wants to merge 8 commits into
brgl:mainfrom
obbardc:wip/obbardc/add-ci
Draft

Add recipe for Yocto ptests & run in GitHub Actions CI#7
obbardc wants to merge 8 commits into
brgl:mainfrom
obbardc:wip/obbardc/add-ci

Conversation

@obbardc
Copy link
Copy Markdown

@obbardc obbardc commented Apr 21, 2026

Initial commit. May be a bit useless as it takes a while to build the image, but we shall see.

Builds a qemux86-64 Yocto image via kas, boots it under QEMU with slirp
networking, and runs ptest-runner gpiod-sysfs-proxy over SSH.

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
@brgl
Copy link
Copy Markdown
Owner

brgl commented Apr 21, 2026

Nice, is this free? Can I do the same for libgpiod core?

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
@obbardc
Copy link
Copy Markdown
Author

obbardc commented Apr 21, 2026

Nice, is this free? Can I do the same for libgpiod core?

yep, for open source projects. Building a yocto image and running it in CI is a bit of an antipattern though

@brgl
Copy link
Copy Markdown
Owner

brgl commented Apr 21, 2026

I don't see a different way of testing it without being able to run a custom kernel with gpio-sim module enabled.

Add build_system: oe to the kas config so kas 4.x can locate the
oe-init-build-env script in the poky checkout.

Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
@obbardc obbardc force-pushed the wip/obbardc/add-ci branch from 24aafcb to 77a3d3f Compare April 21, 2026 14:19
@obbardc
Copy link
Copy Markdown
Author

obbardc commented Apr 21, 2026

I don't see a different way of testing it without being able to run a custom kernel with gpio-sim module enabled.

Yeah, I agree.

Currently it fails with:

Run kas build kas/ci.yml
2026-04-21 14:23:29 - INFO     - kas 4.7 started
2026-04-21 14:23:29 - INFO     - Running on GitHub Actions
2026-04-21 14:23:29 - INFO     - Cloning repository poky
2026-04-21 14:23:29 - INFO     - Cloning repository meta-openembedded
2026-04-21 14:23:36 - INFO     - Repository meta-openembedded already contains master as commit
2026-04-21 14:23:45 - INFO     - Repository poky already contains master as commit
2026-04-21 14:23:45 - INFO     - Repository poky checked out to 5c2b3d184065b0a15695bad7db455ef65653e4c6
2026-04-21 14:23:46 - INFO     - Repository meta-openembedded checked out to 7bf89d06a41405b48fa3af260da36bc686973afc
2026-04-21 14:23:46 - ERROR    - Did not find any init-build-env script

Don't really have time right now to investigate it, but will come back to it soonish.

obbardc added 4 commits April 24, 2026 15:43
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
@obbardc obbardc changed the title Add GitHub Actions CI using Yocto ptests Add recipe for Yocto ptests & run in GitHub Actions CI Apr 25, 2026
Signed-off-by: Christopher Obbard <christopher.obbard@linaro.org>
@obbardc
Copy link
Copy Markdown
Author

obbardc commented Apr 25, 2026

@brgl I managed to build an image with the test deps, but the test always seems to pass. Can you help me figure out what I am doing wrong ? I build & run with:

# build the image
kas-container build tests/yocto/gpiod-sysfs-proxy-tests.yml
kas-container --runtime-args "-v $PWD:/mnt:ro" shell tests/yocto/gpiod-sysfs-proxy-tests.yml
runqemu qemux86-64 core-image-minimal nographic slirp snapshot \
  qemuparams="-virtfs local,path=/mnt,mount_tag=hostshare,security_model=none,id=hostshare"

# inside the VM:
mount -t 9p -o trans=virtio,version=9p2000.L hostshare /mnt
cp /mnt/gpiod-sysfs-proxy /usr/bin/gpiod-sysfs-proxy
systemctl restart gpiod-sysfs-proxy
cd /usr/lib/gpiod-sysfs-proxy/ptest/tests
./gpio-sysfs-compat-tests -v

@brgl
Copy link
Copy Markdown
Owner

brgl commented Apr 27, 2026

@brgl I managed to build an image with the test deps, but the test always seems to pass. Can you help me figure out what I am doing wrong ? I build & run with:

You mean they pass with pyfuse3? The setup looks correct. What's the output from the test script?

@obbardc
Copy link
Copy Markdown
Author

obbardc commented May 5, 2026

@brgl I managed to build an image with the test deps, but the test always seems to pass. Can you help me figure out what I am doing wrong ? I build & run with:

You mean they pass with pyfuse3? The setup looks correct. What's the output from the test script?

The test doesn't seem to use the local checkout of this repo :/. Not sure how to fix that, any pointers welcome!

@brgl
Copy link
Copy Markdown
Owner

brgl commented May 5, 2026

@brgl I managed to build an image with the test deps, but the test always seems to pass. Can you help me figure out what I am doing wrong ? I build & run with:

You mean they pass with pyfuse3? The setup looks correct. What's the output from the test script?

The test doesn't seem to use the local checkout of this repo :/. Not sure how to fix that, any pointers welcome!

How about not installing the gpiod-sysfs-proxy package and getting it directly from git? Just install python3-pip, fuse-dev and packagegroup-self-hosted and you should be good to go?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants