Skip to content

Conversation

@szafonimateusz-mi
Copy link
Contributor

@szafonimateusz-mi szafonimateusz-mi commented Dec 29, 2025

Summary

First step to solve #17717

This PR adds support for NTFC in CI and migrates sim/citest to use NTFC instead of tools/ci/testrun tool.
The rest of citest configs uses the old testing method.

635cb70 must be also ported to nuttx-apps.
EDIT: PR for nuttx-apps is here apache/nuttx-apps#3291 [DONE]

Impact

NTFC performs more tests so sim-01 will take longer but will provide better code coverage.
EDIT: With this change Linux sim-01 took 1h 13m 56s, before this change it took 58m 25s.

Testing

Tested in a private repository, let's see if it works with upstream.

Here is an example run test for sim/citest on my fork with all tests passed:
https://github.com/szafonimateusz-mi/nuttx/actions/runs/20580444513/job/59106747416#step:11:154

I will update this section when upstream CI is finished.

EDIT: successful run is here:
https://github.com/apache/nuttx/actions/runs/20582851657/job/59113926720?pr=17728#step:11:247

Test start:
image

Test end:
image

Linux sim-01 took 1h 13m 56s, before this change it took 58m 25s, so tests for this target take 15 minutes more (not bad):

image image

Summary from pytest before this PR:

================ 1058 passed, 10 skipped in 2735.05s (0:45:35) =================

Summary from pytest for this PR:

================ 1224 passed, 548 skipped in 3625.97s (1:00:25) ================

@szafonimateusz-mi
Copy link
Contributor Author

I have updated the description according to the CI results. Linux sim-01 took 1h 13m 56s, before this change it took 58m 25s, so tests take 15 minutes more. For comparison, the entire CI workflow took 3 hours.

Summary from pytest before this PR:

================ 1058 passed, 10 skipped in 2735.05s (0:45:35) =================

Summary from pytest for this PR:

================ 1224 passed, 548 skipped in 3625.97s (1:00:25) ================

Add support for NTFC testing framework.

At the moment NTFC is downloaded from a private repo,
and installed with pip and venv. In the future NTFC repositories
will be migrated to Apache organization.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
export currently build configuration and path to artifacts
so these can be used by NTFC run script

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
migrate sim/citest to NTFC test cases

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Executable files called "run" don't pass checkpath verification,
so we change the name to "run.sh"

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
Copy link
Contributor

@acassis acassis left a comment

Choose a reason for hiding this comment

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

@szafonimateusz-mi please include basic Documentation about this new test framework

@szafonimateusz-mi
Copy link
Contributor Author

What do you want documented? The NTFC documentation is in the NTFC repository https://github.com/szafonimateusz-mi/nuttx-ntfc/

@github-actions github-actions bot added the Area: Documentation Improvements or additions to documentation label Jan 2, 2026
@acassis
Copy link
Contributor

acassis commented Jan 2, 2026

What do you want documented? The NTFC documentation is in the NTFC repository https://github.com/szafonimateusz-mi/nuttx-ntfc/

Sorry, I missed that Running CI Tests with tools/ci/testrun section. So I think it is fine

acassis
acassis previously approved these changes Jan 2, 2026
@szafonimateusz-mi
Copy link
Contributor Author

@acassis No need to sorry, I updated this file after your comment :P I've also created a new top section in the docs: "Testing." Ultimately, CI's operation can be better described there.

@raiden00pl raiden00pl requested a review from acassis January 2, 2026 15:12
acassis
acassis previously approved these changes Jan 2, 2026
The framework and official test cases are available at:

- https://github.com/szafonimateusz-mi/nuttx-ntfc
- https://github.com/szafonimateusz-mi/nuttx-testing
Copy link
Contributor

Choose a reason for hiding this comment

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

I hope the plan is to eventually move the framework and official test cases under the apache/nuttx repositories?

Copy link
Contributor

Choose a reason for hiding this comment

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

why moving test case to nuttx repo?

@hartmannathan
Copy link
Contributor

Hi all, as I said in my review comment, I hope the plan is to eventually move the framework and official test cases under the apache/nuttx repositories.

@simbit18
Copy link
Contributor

simbit18 commented Jan 2, 2026

Question:

Could this repository Apache NuttX Testing

be reused to contain both repositories NuttX Test Framework and NTFC test cases ?

@raiden00pl
Copy link
Member

@simbit18 we need 2 separate repositories. NTFC is not dependent on NTFC test cases in any way, the user can use their own test cases. In addition, NTFC is organized as a Python package and has different requirements regarding maintainence and CI.

@hartmannathan yes, it will be moved to Apache, we just need one more repository for nuttx-ntfc. Do we need INFRA to create a new repository or can we do it ourselves?

update citests.rst and move page from Guides to Testing

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
@hartmannathan
Copy link
Contributor

@simbit18 we need 2 separate repositories. NTFC is not dependent on NTFC test cases in any way, the user can use their own test cases. In addition, NTFC is organized as a Python package and has different requirements regarding maintainence and CI.

@hartmannathan yes, it will be moved to Apache, we just need one more repository for nuttx-ntfc. Do we need INFRA to create a new repository or can we do it ourselves?

@raiden00pl We can create repositories using INFRA's Self-Service tools, but I think that will create empty repositories. I think what we need in this case is to clone the repos; correct me if this isn't the case. I don't see a way to create a repo as a clone. We can ask INFRA to do it by opening a Jira ticket and telling them the URLs of the repos we want cloned... Thoughts?

@raiden00pl
Copy link
Member

raiden00pl commented Jan 3, 2026

@hartmannathan We can clone the repo with INFRA, but we can also do it differently: create an empty repository and add all changes in one pull request. Both options are OK for me, the question is which one is faster :)

@raiden00pl
Copy link
Member

Here's a PR for nuttx-testing adding test cases to repo: apache/nuttx-testing#102

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

Labels

Area: CI Area: Documentation Improvements or additions to documentation Area: Tooling Board: arm Board: risc-v Board: simulator Size: M The size of the change in this PR is medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants