-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sim: add defconfig for testing cmake compilation of quickjs #14693
Conversation
[Experimental Bot, please feedback here] This PR template does a good job of outlining the information needed for a NuttX contribution. However, it could be improved with a few tweaks to make it clearer and more actionable for contributors. Here's a revised template: # NuttX Pull Request
## Summary
* **What problem does this solve?** (bug fix, enhancement, new feature) Be specific and concise.
* **What code is affected?** (e.g., drivers/sensors, sched/, net/...)
* **How does this change address the problem?** Briefly explain the technical approach.
* **Related Issue:** (e.g., `Fixes #1234`, `Part of #5678`) Link to the NuttX issue, if applicable.
* **Related NuttX Apps Issue/PR:** Link to the NuttX Apps issue or PR, if applicable.
## Impact
Please answer YES or NO for each question and provide a brief explanation if YES.
* **New Feature?** [ ] YES / [ ] NO (If YES, describe the new functionality)
* **User Impact?** [ ] YES / [ ] NO (If YES, how will users be affected? Will they need to change their code or configuration?)
* **Build Impact?** [ ] YES / [ ] NO (If YES, how will the build process be affected? New dependencies? New configuration options?)
* **Hardware Impact?** [ ] YES / [ ] NO (If YES, which architectures, boards, or drivers are affected?)
* **Documentation Impact?** [ ] YES / [ ] NO (If YES, does documentation need updating? Has documentation been updated as part of this PR?)
* **Security Impact?** [ ] YES / [ ] NO (If YES, describe any potential security implications)
* **Compatibility Impact?** [ ] YES / [ ] NO (If YES, describe any backward/forward compatibility or interoperability issues)
* **Other Considerations?** (Anything else reviewers should be aware of?)
## Testing
* **Build Host(s):** OS (e.g., Linux Ubuntu 20.04), CPU (e.g., x86_64), Compiler (e.g., GCC 9.4.0)
* **Target(s):** Architecture (e.g., sim, RISC-V, ARM Cortex-M4), Board:Config (e.g., stm32f4discovery:nsh)
**Verification Steps:** (Clearly describe the steps taken to test this change. Be specific!)
**Test Results:**
* **Before Change:** (Paste relevant logs or output demonstrating the issue before the change. If a new feature, describe the expected behavior.)
(Paste relevant logs or output demonstrating the fix or new functionality.)
Key improvements:
This revised template is more structured and provides clearer guidance for contributors, leading to higher-quality pull requests and a smoother review process. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Later we can rename nsh/defconfig
to quickjs/defconfig
. Thank you so much for porting QuickJS to NuttX! :-)
Please remember to run tools/refresh.sh and commit the updated defconfig. Thanks! $ tools/refresh.sh --silent sim:nsh
Normalize sim:nsh
37a38,40
> CONFIG_INTERPRETERS_QUICKJS=y
> CONFIG_INTERPRETERS_QUICKJS_BIGNUM=y
> CONFIG_INTERPRETERS_QUICKJS_FULL=y
39a43
> CONFIG_LIBC_DLFCN=y
51a56
> CONFIG_PIPES=y
59d63
< CONFIG_SCHED_WAITPID=y
65,66d68
< CONFIG_TESTING_OSTEST=y
< CONFIG_PIPES=y
68,76c70
< CONFIG_SYSTEM_POPEN_STACKSIZE=2048
< CONFIG_SYSTEM_POPEN_PRIORITY=100
< CONFIG_LIBC_DLFCN=y
< CONFIG_LDPATH_INITIAL=""
< CONFIG_INTERPRETERS_QUICKJS=y
< CONFIG_INTERPRETERS_QUICKJS_FULL=y
< CONFIG_INTERPRETERS_QUICKJS_BIGNUM=y
< CONFIG_INTERPRETERS_QUICKJS_PRIORITY=100
< CONFIG_INTERPRETERS_QUICKJS_STACKSIZE=8192
---
> CONFIG_TESTING_OSTEST=y
Saving the new configuration file
$ git status
Changes not staged for commit:
modified: boards/sim/sim/sim/configs/nsh/defconfig |
@lupyuen Should I created the file quickjs/defconfig and run |
Yes please run |
0aabeb7
to
0b9bbdd
Compare
Done |
Can you commit the modified defconfig? Thanks! $ git clone https://github.com/WenLY1/nuttx --branch qjs_defconfig
$ git clone https://github.com/WenLY1/nuttx-apps apps --branch quickjs_upstream
$ cd nuttx
$ tools/refresh.sh --silent sim:quickjs
$ git status
modified: boards/sim/sim/sim/configs/quickjs/defconfig |
0b9bbdd
to
8c1de53
Compare
Done. :) |
We'll re-run the CI Checks when |
Hmmm I think I need to update the CI Testlist to run CMake (instead of normal Make). Lemme check...
https://github.com/apache/nuttx/actions/runs/11774919637/job/32796450018#step:7:152 |
@WenLY1 Could you rebase to master branch while I check on CMake in the Testlist? Thanks! |
8c1de53
to
45872b0
Compare
Done |
@WenLY1 Could you please make this change to Squash the commits, then I will re-run the CI Check. Thanks! |
45872b0
to
5321db5
Compare
Done |
Thanks @WenLY1! Now the CI Checks won't build sim-03 with QuickJS (because we modified testlist and it became a Complex PR). So I cloned your branch to my repo and forced it to build sim-03 with QuickJS. Let's check the result here: https://github.com/nuttxpr2/nuttx/actions/runs/11777084493/job/32800846925 |
@WenLY1 Sorry somehow your defconfig reverted to the old version. https://github.com/apache/nuttx/pull/14693/files
Could you refresh and recommit the defconfig? Thanks! $ git clone https://github.com/WenLY1/nuttx --branch qjs_defconfig
$ git clone https://github.com/WenLY1/nuttx-apps apps --branch quickjs_upstream
$ cd nuttx
$ tools/refresh.sh --silent sim:quickjs
$ git status
modified: boards/sim/sim/sim/configs/quickjs/defconfig |
If it's too messy to fix the commits, maybe we could close this PR, do a new PR with the 2 changed files? Thanks, sorry for the extra work :-) |
Signed-off-by: wenlingyun1 <[email protected]>
4bca831
to
905004a
Compare
It's ok now :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI Check tested OK on Docker with sim-03 and sim:quickjs. Thank you so much! :-)
https://gist.github.com/nuttxpr/27319238463830aa03ff08dffbf34fbb
$ sudo docker run -it \
ghcr.io/apache/nuttx/apache-nuttx-ci-linux:latest \
/bin/bash
$ cd
$ git clone https://github.com/WenLY1/nuttx --branch qjs_defconfig
$ git clone https://github.com/apache/nuttx-apps apps ;
$ cd nuttx/tools/ci
$ ./cibuild.sh -c -A -N -R testlist/sim-03.dat
Cmake in present: sim/quickjs
Configuration/Tool: sim/quickjs
Cleaning...
Configuring...
Select HOST_LINUX=y
Select HOST_X86_64=y
Building NuttX...
Note: Please adhere to Contributing Guidelines.
Summary
Update this section with information on why change is necessary,
what it exactly does and how, if new feature shows up, provide
references (dependencies, similar problems and solutions), etc.
Impact
Update this section, where applicable, on how change affects users,
build process, hardware, documentation, security, compatibility, etc.
Testing
Update this section with details on how did you verify the change,
what Host was used for build (OS, CPU, compiler, ..), what Target was
used for verification (arch, board:config, ..), etc. Providing build
and runtime logs from before and after change is highly appreciated.