Skip to content

tools/ci: remove legacy testrun Python pins - #20882

Merged
acassis merged 2 commits into
apache:masterfrom
Brijesh-Thakkar:ci/ntfc-drop-legacy-testrun-deps
Oct 23, 2026
Merged

acassis merged 2 commits into
apache:masterfrom
Brijesh-Thakkar:ci/ntfc-drop-legacy-testrun-deps

Conversation

@Brijesh-Thakkar

Copy link
Copy Markdown
Contributor

Summary

Remove the Python pins that were only needed by tools/ci/testrun, which was
deleted in 179bf35 ("tools/ci: remove obsolete testrun harness"):

  • pexpect==4.8.0
  • pytest==6.2.5
  • pytest-json==0.4.0
  • pytest-ordering==0.6
  • pytest-repeat==0.9.1

They are removed from tools/ci/docker/linux/Dockerfile (together with the
# Install pytest comment, which sat above unrelated packages) and from the
python_tools() list in tools/ci/platforms/{linux,ubuntu,darwin,darwin_arm64}.sh.
All other packages are kept.

CI now uses NTFC. .github/workflows/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, 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.log file names in the citest*/run.sh scripts,
one sentence in Documentation/testing/ntfc.rst, and the pkill -f pytest
watchdog 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 install lines of the Dockerfile in order):

package before (CI today) after this PR
pytest 9.1.1 9.1.1
pexpect 4.8.0 4.9.0
pytest-repeat 0.9.1 0.9.4
pytest-ordering 0.6 0.6 (via ntfc)
pytest-json 0.4.0 removed

attrs, py and toml (dependencies of the old pytest/pytest-json) also
disappear from the image. Local setups using tools/ci/platforms/*.sh no
longer install packages that nothing uses.

Testing

Resolved versions (method): in a bare ubuntu:22.04 container I ran the
pip3 install lines of the Dockerfile in order, then pip install --default-timeout=100 --retries 10 ntfc==0.0.3, once with and once without
the 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, py and toml.

Functional check: sim:citest with NTFC 0.0.3, nuttx-ntfc-testing tag
release-0.0.2, gcc-12.5.0, built with ./tools/ci/cibuild.sh -c -A -N -R -S
on /sim/*/*/*/citest, once in a venv matching "before" and once matching
"after":

run passed failed skipped pytest time
before 1221 0 306 1089.9 s
after 1221 0 306 1106.6 s

The per-test results of the two runs are identical (1527 test ids).

Static checks: ./tools/checkpatch.sh -g upstream/master..HEAD passes and the
four platform scripts pass bash -n.

The Dockerfile change is built by docker_linux.yml on this PR but not
published until merge (it only pushes from master). Until then the build jobs
keep using the published image.

Caveats:

  • The host Python was 3.14, CI uses 3.10 (the freezes above were taken on
    3.10).
  • Only sim:citest was 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: ntfc calls
pytest.main() in-process and its command line is .../bin/ntfc test .... In
my runs pgrep -f pytest matched only the bash -c wrapper and the
watchdog subshell, because the script text passed to bash -c contains the
word "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 in
the nuttx-apps build.yml.

Generated-by: Claude Code (analysis, test runs and drafting); reviewed and tested by me.

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>
Copilot AI balanced review requested due to automatic review settings October 22, 2026 11:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions github-actions Bot added Area: CI Size: S The size of the change in this PR is small labels Oct 22, 2026
@github-actions

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

@acassis
acassis merged commit a1116dc into apache:master Oct 23, 2026
54 checks passed
@Brijesh-Thakkar
Brijesh-Thakkar deleted the ci/ntfc-drop-legacy-testrun-deps branch October 23, 2026 22:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: CI Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants