Skip to content
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

sys/shell: add support for running a batch of commands from a file #20651

Merged
merged 5 commits into from
May 15, 2024

Conversation

benpicco
Copy link
Contributor

@benpicco benpicco commented May 6, 2024

Contribution description

This was requested for easier integration testing: It allows to provide a fixed (native) binary that is able to execute shell commands provided by a file and terminate when it finished executing the commands (with an error code indicating success).

Testing procedure

A simple test application is provided in tests/sys/shell_scripting.

Issues/PRs references

@github-actions github-actions bot added Area: tests Area: tests and testing framework Area: sys Area: System labels May 6, 2024
@benpicco benpicco requested a review from fabian18 May 6, 2024 17:40
@benpicco benpicco force-pushed the shell_scripting branch 4 times, most recently from 0603255 to fc0b58a Compare May 7, 2024 21:22
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label May 7, 2024
@riot-ci
Copy link

riot-ci commented May 7, 2024

Murdock results

✔️ PASSED

cc2dca1 tests/shell_scripting: add test for running commands from file

Success Failures Total Runtime
10105 0 10105 14m:14s

Artifacts

@benpicco benpicco force-pushed the shell_scripting branch 2 times, most recently from 90287a8 to c86095e Compare May 7, 2024 21:30
Copy link
Contributor

@fabian18 fabian18 left a comment

Choose a reason for hiding this comment

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

Awesome feature.

sys/include/shell.h Show resolved Hide resolved
sys/include/vfs_util.h Show resolved Hide resolved
sys/vfs/vfs.c Show resolved Hide resolved
tests/sys/shell_scripting/Makefile Outdated Show resolved Hide resolved
sys/vfs_util/vfs_util.c Show resolved Hide resolved
tests/sys/shell_scripting/main.c Outdated Show resolved Hide resolved
tests/sys/shell_scripting/main.c Show resolved Hide resolved
Copy link
Contributor

@fabian18 fabian18 left a comment

Choose a reason for hiding this comment

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

Please squash. I think it is good. Only think about if you want to keep or drop vfs_file_exists(). It is not used here anymore, but could still be useful.

@benpicco benpicco enabled auto-merge May 15, 2024 09:33
@benpicco benpicco added this pull request to the merge queue May 15, 2024
Merged via the queue into RIOT-OS:master with commit 2279524 May 15, 2024
25 checks passed
@benpicco benpicco deleted the shell_scripting branch May 15, 2024 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants