Our Gitlab pipeline is currently broken up in to several stages. This
was done with the thought process of "we should test tools and if
they're good test emulated targets and if they're good test real
hardware and if they're good test the world". However, in terms of that
first stage it only really matters that binman, et al are still
functional. And for a few years now Gitlab has had a "needs" keyword
that lets you refine pipeline dependencies. Use this to perform the
minor optimization of having test.py only require that tool testing job.
This will become more useful later when we add long running testsuites
that we do not want to block later jobs.
Signed-off-by: Tom Rini <trini@konsulko.com>
(cherry picked from commit 08c1e15195)
Updated name of test-suits job:
Signed-off-by: Simon Glass <simon.glass@canonical.com>
In the test.py stage of the build we mark the pytest results as
artifacts to save, so that they can be used for reports. This however
leads to all of the artifacts being downloaded (and then not used) in
later stages. Optimize this out by using an empty list of dependencies
here (which is the keyword for which artifacts are needed).
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit d3bb245855)
Currently the stage/board selection only works with normal pushes, since
gitlab unfortunately drops CI variables when starting an MR pipeline.
Fix this by looking for tags in the MR description. This only supports
stage-selection, not individual boards.
Simplify the workflow since the previous changes are now not needed.
Cover-letter:
Updates for the new utool
This series includes a patch to make CI work with the way utool
operates, specifically to allow merge requests to honour its requests.
It also drops an unwanted test file.
END
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Prevent automatic merge request pipelines unless UTOOL_TRIGGER=1
is set. This allows utool to create controlled pipelines with
specific CI variables while preventing duplicate automatic pipelines.
Simplify variable name for controlling pytest jobs.
Series-to: concept
Cover-letter:
CI: Tidy up the variables
This series cleans up the variables to make them easier to distinguish
and to avoid duplication.
It also attempts to fix pushing to github.
END
Signed-off-by: Simon Glass <simon.glass@canonical.com>
At present GitLab CI fails in the trigger_snap_builds stage with
ref-locking errors like:
"cannot lock ref 'refs/remotes/origin/ci/cherry-3bfd12008be':
'refs/remotes/origin/ci' exists"
This occurs because git fetch commands download all remote branches,
including conflicting refs where both 'ci' and 'ci/cherry-*' branches
exist, creating filesystem conflicts.
Remove the unnecessary git fetch commands and only push only the master
branch directly to GitHub, avoiding the ref conflict entirely.
Signed-off-by: Simon Glass <simon.glass@canonical.com>
We don't actually need the LAB_ONLY variable, since we can control which
stages run using the other variables (TEST_SUITES, TEST_PY, WORLD_BUILD).
To run only lab jobs, we can set TEST_PY, WORLD_BUILD and TEST_SUITES to
"0". The only advantage to LAB_ONLY is that it avoids doing this. But we
can create a script to handle it.
So drop this special variable.
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add a CI job to run buildman's test coverage check. This ensures
test coverage doesn't regress when changes are made to buildman.
Series-to: concept
Cover-letter:
buildman: Enable code coverage in CI
This little series fixes a few things in buildman so that we can check the
code coverage, although only a few files have 100% at this point.
END
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
The date format from 'git log --format=%ci' includes spaces
(e.g., "2024-01-15 17:28:00 -0700"). Without quotes, the shell
splits this and git sees only "17:28:00" as an invalid refspec.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
The trigger_snap_builds job fails when pushing to GitHub because GitLab
uses shallow clones by default. GitHub may expect objects that aren't
present in the shallow clone.
Fix this by fetching only the commits needed: first get GitHub's current
master (depth=1), then fetch from origin only commits since that date.
This is much faster than fetching the entire history.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add git safe.directory config before pushing to GitHub to avoid
"dubious ownership" errors in the CI container environment.
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add GitHub push to the trigger_snap_builds job so that when merges
land on master, the code is also pushed to the u-boot-concept GitHub
repository, triggering ReadTheDocs documentation rebuilds.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
These boards are no longer available in the lab, so drop them from the
CI configuration.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add pickman test suite to the existing tool test job alongside binman,
buildman, dtoc and patman tests.
Series-to: concept
Cover-letter:
pickman: Refine the feature set
This series adds a few more features and tweaks to make pickman work
better in practice.
The main issue is that the branch logic is not correct, so it selects
the wrong branch once one has already been applied.
Other improvements in this series:
- stop polling if an error occurs
- allow using a config file for the gitlab credentials (so we can set up
a 'pickman' user), along with a command to check gitlab access
- add the Claude log to the merge request, when it responds to comments
- maintain comments in a database so we know what was addressed
- add a command to figure out how many merges are pending and to show
the next 10
- measure test coverage, improve it (not 100%) and add to CI
END
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Add rule to run lab tests automatically when the pipeline is triggered
by a merge request event. This allows pickman-created MRs to have lab
tests run without needing to set SJG_LAB=1 manually.
Co-developed-by: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: Simon Glass <simon.glass@canonical.com>
This test expects to only sese a subset of the symbols in the
executable. Disable backtrace to avoid dealing with changes in this
area.
Signed-off-by: Simon Glass <simon.glass@canonical.com>
Update the GitLab CI Docker image to use the new build with cryptsetup
support for LUKS testing.
This appears to require use of sudo, so add a comment about that.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Add a Python script to replace shell-based release version calculations
with proper datetime handling:
Features:
- Calculates release versions based on U-Boot's bimonthly schedule
- RC numbering counts backwards from final release (rc1=2wks, rc2=4wks,
rc3=6wks)
- Dead-period detection for dates too early in release cycle
- Automatic Makefile version updates
- Release documentation generation and updates
- Multiple output formats (shell variables, JSON, version string)
Testing:
- 39 comprehensive test cases covering all scenarios
- 93% test coverage including edge cases and error handling
- Tests for cross-year boundaries, dead periods, and file operations
The script provides robust release automation for the GitLab CI pipeline
with proper error handling and extensive validation.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org)
Ensure SSH user is specified in git clone URLs. Clean up the key format
a little.
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: GitLab CI Runner <trini@konsulko.com>
This is an attempt to trigger updates of the u-boot-concept-qemu/efi
snaps whenever code is merged in this repo.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add the Rust examples to the 'Examples' test suite, so that we can be
sure they continue to build and run.
Series-to: concept
Series-cc: heinrich
Cover-letter:
ulib: Add support for Rust main programs
So far ulib only supports linking against C programs. While this is the
common case, there is no particular reason why other languages could not
be used to write the main program, so long as they can interoperate with
the libu-boot.so/.a library.
Rust provides a Foreign Function Interface feature, which makes it
possible to declare and call C functions from Rust code. It provides
memory safety without the uncertainty of garbage collection and with
less overhead. It would be nice if ulib could be used with Rust.
This series provides the necessary pieces to make this work. It adds an
example program which works just like the C one, but written in Rust. As
with the existing example, the program can be built against the static
ulib or can use dynamic linking.
Note that only sandbox is supported at present, i.e. native execution on
(for example) a Linux machine. Future work will add support for running
on other architectures.
In order to make more use of ulib features, U-Boot's headers will need
to be made available in Rust format. For now, only a very few are
provided, as a starting point.
END
Signed-off-by: Simon Glass <sjg@chromium.org>
These tests run as part of the test.py phase, since they will fail if
there is a problem there. Fix up the logic at the start to use this
phase, supporting the same options as the other tests.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add these to CI so that we can keep them running more easily.
Sadly the 'make check' takes about 10mins to run, so put these in the
test.py stage, where there are other slow tests.
Unfortunately 'make pcheck' doesn't work in CI:
https://concept.u-boot.org/u-boot/u-boot/-/jobs/115074
The problem may be due to a race between image-creation and testing
using those images. Further work is needed to improve handling of
fixtures when running tests in parallel.
Series-to: concept
Cover-letter:
test: Improvements to make check et al
It is helpful to be able to run 'make qcheck' to run a subset of the
tests in a short time. However this has not always been reliable. Since
this feature is not tested in CI it can sometimes break.
Now that things are working correctly, add it the various 'make check'
combinations to CI, so they will remain functional.
END
Signed-off-by: Simon Glass <sjg@chromium.org>
Series-links: 1:8
Add a new board which can run the EFI app and boot an OS.
Series-to: concept
Series-cc: heinrich
Series-version: 2
Cover-letter:
efi: Support booting an OS with the EFI app on ARM
The ARM EFI app does not successfully boot an OS at present. This series
includes patches to allow it to boot an OS via extlinux:
The main changes are:
- Call exit-boot-services before jumping to the OS
- Write the physical-memory info to the FDT
- Tidy up some Kconfig options
- Improve keyboard compatibility
Note that QEMU 8.2 does not boot Ubuntu 24.04 with this series[1]. The
kernel dies quite early with:
ERROR:target/arm/internals.h:767:regime_is_user: code should not be reached
Bail out! ERROR:target/arm/internals.h:767:regime_is_user: code should not be reached
QEMU 9.2 resolves this problem.
[1] https://lists.opensuse.org/archives/list/bugs@lists.opensuse.org/
message/XVO4M4LDEFOORP5M4ZFINZDX36DWO3G5/
END
Signed-off-by: Simon Glass <sjg@chromium.org>
Normally the job itself controls which tests are run, by providing an
optional test spec and using the -k option.
It is sometimes useful to run a subset of tests on CI. Add a new
TEST_SPEC variable to control this.
Signed-off-by: Simon Glass <sjg@chromium.org>
Provide some additional variables which can be used to deselect whole
stages, or select a particular test.py build.
Signed-off-by: Simon Glass <sjg@chromium.org>
The rules are enough to handle the results logic. Drop the redundant
checks at the start of the bash script.
Signed-off-by: Simon Glass <sjg@chromium.org>
We use 'testsuites' for the test suites and 'world build' for the world
build. This is inconsistent. Use 'test_suites' and 'word_build' instead,
to avoid confusion.
Signed-off-by: Simon Glass <sjg@chromium.org>
Introduce a new CI job in .gitlab-ci-release.yml to automate the
creation of project releases.
This change implements two new jobs in .gitlab-ci-release.yml:
1. A version:bump job that runs on a schedule. On the first Monday of an
even-numbered month, it automatically updates the VERSION and PATCHLEVEL
in the Makefile and pushes the change to the master branch.
2. A release:create job that is triggered by the version bump commit. It
creates the final GitLab Release and corresponding Git tag on the commit
containing the updated Makefile.
This ensures that the repository's version is correctly updated and
committed just before the official release tag is applied, creating a
clean and reliable release history.
This single job, designed to run on a schedule, contains logic to:
- create a final release (e.g. 2025.08) on the first Monday of an
even-numbered month.
- create a release candidate (e.g. 2025.07-rc1) on all other
scheduled days.
This uses official release-cli to create both the git tag and the
corresponding GitLab Release entry automatically.
Signed-off-by: Simon Glass <sjg@chromium.org>
Introduce a new CI job in .gitlab-ci-release.yml to automate the
creation of project releases.
This single job, designed to run on a schedule, contains logic to:
- create a final release (e.g. 2025.08) on the first Monday of an
even-numbered month.
- create a release candidate (e.g. 2025.07-rc1) on all other
scheduled days.
This uses official release-cli to create both the git tag and the
corresponding GitLab Release entry automatically.
Signed-off-by: Simon Glass <sjg@chromium.org>
This board is interesting since it has two separate U-Boot builds. Add
it to the sjg lab.
Add the required support for a second build directory.
Signed-off-by: Simon Glass <sjg@chromium.org>
Sometimes it is useful to test a commit just on the lab, or even just on
a particular board in the lab. Add support for this.
Signed-off-by: Simon Glass <sjg@chromium.org>
These hooks are now in-tree, so update the PATH to the new location.
With this it is possible to update CI and adjust hooks in the same
patch.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add tests that check that SPL can generate a standard passage on ARM and
that U-Boot proper can accept it successfully.
Series-change: 4
- Finish the commit message
Series-to: u-boot
Series-cc: ilias, heinrich, trini
Series-cc: François Ozog <francois.ozog@linaro.org>
Series-cc: Bill Mills <bill.mills@linaro.org>
Series-cc: Raymond Mao <raymond.mao@linaro.org>
Series-version: 5
Series-process-log: sort, uniq
Series-links: 3:453293
Cover-letter:
passage: Define a standard for firmware data flow
This series adds a standard way of passing information between different
firmware phases. This already exists in U-Boot at a very basic level, in
the form of a bloblist containing an spl_handoff structure, but the intent
here is to define something useful across projects.
The need for this is growing as firmware fragments into multiple binaries
each with its own purpose. Without any run-time connection, we must rely
on build-time settings which are brittle and painful to keep in sync.
This feature is named 'standard passage' since the name is more unique
than many others that could be chosen, it is a passage in the sense that
information is flowing from one place to another and it is standard,
because that is what we want to create.
The implementation is mostly a pointer to a bloblist in a register, with
an extra register to point to a devicetree, for more complex data. This
should cover all cases (small memory footprint as well as complex data
flow) and be easy enough to implement on all architectures.
The emphasis is on enabling open communcation between binaries, not
enabling passage of secret, undocumented data, although this is possible
in a private environment.
To try this out:
$ ./scripts/build-qemu -a arm -rsx
This will build and run QEMU for arm64 and you should see the standdard
passage working:
Core: 49 devices, 13 uclasses, devicetree: passage
This series is available at u-boot-dm/pass-working
END
Cover-changes: 2
- Rebase to master (dropping bloblist patches already applied)
Series-changes: 3
- Add tests for azure
- Add test for aarch64
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I321f53b875ffb594a569796509e64830b9f3fe09
Now that the hooks are present, make use of them directly rather than
cloning the separate repo.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
As noted by Quentin, in CI we should be at least versioning the pytest
that we install. To avoid problems later, go with the whole requirements
file being used. Furthermore, our documentation building for readthedocs
must also have pytest so install the requirements file there as well.
Reported-by: Quentin Schulz <quentin.schulz@cherry.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
This adds the vexpress_fvp and vexpress_fvp_bloblist platforms to the
list of platforms we test via emulator in CI. In order to do this we
need to first have our container runtime have TF-A builds for the
vexpress_fvp platform, both with and without transfer list support as
well as installing "telnet" so that we can access console. In the CI
files we check for the existence of /opt/tf-a/${TEST_PY_BD} and if
found, copy bl1.bin and fip.bin to /tmp and set the variables so that we
can later run FVP to run.
Note that we currently disable the hostfs (semihosting) tests as they
trigger a bug in FVP. This has been reported upstream, and can be
enabled when fixed.
Reviewed-by: Harrison Mutai <harrison.mutai@arm.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Tom Rini <trini@konsulko.com>
Now that U-Boot can boot this quickly, using kvm, add a test that the
installer starts up correctly.
Use the qemu-x86_64 board in the SJG lab.
Signed-off-by: Simon Glass <sjg@chromium.org>
Binman includes a good set of tests covering all of its functionality.
This includes a code-coverage test.
However to date the code-coverage test has not been checked
automatically by CI, relying on people to run 'binman test -T'
themselves.
Plug the gap to avoid bugs creeping in future.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
It seems that the new approach doesn't go far enough, since when there
are multiple independent runners on a machine, they end up sharing the
same git directory.
Add $CI_RUNNER_ID as well, so they are kept separate.
Signed-off-by: Simon Glass <sjg@chromium.org>