Repository navigation
tools/ci: remove legacy testrun Python pins - #20882
Merged
acassis merged 2 commits intoOct 23, 2026
Merged
Conversation
pexpect==4.8.0, pytest==6.2.5, pytest-json==0.4.0, pytest-ordering==0.6 and pytest-repeat==0.9.1 were dependencies of tools/ci/testrun, which was removed in 179bf35 ("tools/ci: remove obsolete testrun harness"). CI now uses NTFC. build.yml installs ntfc==0.0.3, which pulls in its own pytest and pexpect. The pytest==6.2.5 pin already had no effect, because that pip install upgrades pytest to 9.1.1 at job time. Also drop the "# Install pytest" comment, which sat above unrelated packages. All other packages are kept. Part of apache#17717 Generated-by: Claude Code Signed-off-by: Brijesh Thakkar <brijeshthakkariitian5126@gmail.com>
pexpect==4.8.0, pytest==6.2.5, pytest-json==0.4.0, pytest-ordering==0.6 and pytest-repeat==0.9.1 were dependencies of tools/ci/testrun, which was removed in 179bf35 ("tools/ci: remove obsolete testrun harness"). CI now uses NTFC. build.yml installs ntfc==0.0.3, which pulls in its own pytest and pexpect. The pytest==6.2.5 pin already had no effect, because that pip install upgrades pytest to 9.1.1 at job time. Remove the pins from the python_tools() list of linux.sh, ubuntu.sh, darwin.sh and darwin_arm64.sh, and drop the trailing backslash that is no longer needed after pyserial. All other packages are kept. Part of apache#17717 Generated-by: Claude Code Signed-off-by: Brijesh Thakkar <brijeshthakkariitian5126@gmail.com>
xiaoxiang781216
approved these changes
Oct 22, 2026
|
acassis
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Remove the Python pins that were only needed by
tools/ci/testrun, which wasdeleted in 179bf35 ("tools/ci: remove obsolete testrun harness"):
pexpect==4.8.0pytest==6.2.5pytest-json==0.4.0pytest-ordering==0.6pytest-repeat==0.9.1They are removed from
tools/ci/docker/linux/Dockerfile(together with the# Install pytestcomment, which sat above unrelated packages) and from thepython_tools()list intools/ci/platforms/{linux,ubuntu,darwin,darwin_arm64}.sh.All other packages are kept.
CI now uses NTFC.
.github/workflows/build.ymlinstallsntfc==0.0.3, whichpulls in its own pytest and pexpect. The
pytest==6.2.5pin already had noeffect, since that install upgrades pytest to 9.1.1 at job time.
No other code in nuttx or nuttx-apps imports these packages. The remaining
mentions are
pytest.debug.logfile names in thecitest*/run.shscripts,one sentence in
Documentation/testing/ntfc.rst, and thepkill -f pytestwatchdog line in
build.yml(see the note below).Part of #17717
Impact
No functional CI change expected. Versions resolved after
pip install ntfc==0.0.3(ubuntu:22.04, Python 3.10.12,
pip3 installlines of the Dockerfile in order):attrs,pyandtoml(dependencies of the old pytest/pytest-json) alsodisappear from the image. Local setups using
tools/ci/platforms/*.shnolonger install packages that nothing uses.
Testing
Resolved versions (method): in a bare
ubuntu:22.04container I ran thepip3 installlines of the Dockerfile in order, thenpip install --default-timeout=100 --retries 10 ntfc==0.0.3, once with and once withoutthe five pins, and compared
pip3 freeze. pip reported no resolver warnings.Without the pins the only differences are the ones in the table above plus
attrs,pyandtoml.Functional check:
sim:citestwith NTFC 0.0.3, nuttx-ntfc-testing tagrelease-0.0.2, gcc-12.5.0, built with./tools/ci/cibuild.sh -c -A -N -R -Son
/sim/*/*/*/citest, once in a venv matching "before" and once matching"after":
The per-test results of the two runs are identical (1527 test ids).
Static checks:
./tools/checkpatch.sh -g upstream/master..HEADpasses and thefour platform scripts pass
bash -n.The Dockerfile change is built by
docker_linux.ymlon this PR but notpublished until merge (it only pushes from master). Until then the build jobs
keep using the published image.
Caveats:
3.10).
sim:citestwas run. The QEMU targets (arm64, x86_64, rv-virt,sabre-6quad) were not and are left to CI.
Note for maintainers (not changed in this PR)
The watchdog in
build.yml,( sleep 7200 ; echo Killing pytest after timeout... ; pkill -f pytest )&, never matches the NTFC process:ntfccallspytest.main()in-process and its command line is.../bin/ntfc test .... Inmy runs
pgrep -f pytestmatched only thebash -cwrapper and thewatchdog subshell, because the script text passed to
bash -ccontains theword "pytest". On a timeout it would therefore kill the whole step, not
pytest. I did not exercise the timeout itself. Happy to send a follow-up if
you'd like it changed (e.g.
pkill -f "ntfc test"). The same pattern is inthe nuttx-apps
build.yml.Generated-by: Claude Code (analysis, test runs and drafting); reviewed and tested by me.