Linux CommandExecutor #536
No reviewers
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#536
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "eive/fsfw:mueller/cmd-executor"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The CommandExecutor helper class can execute shell commands in blocking and non-blocking mode
This class is able to execute processes by using the Linux
popen
call. It also has the capability of writingthe read output of a process into a provided ring buffer.
The executor works by first loading the command which should be executed and specifying whether
it should be executed blocking or non-blocking. After that, execution can be started with the execute call.
Using non-blocking mode allows to execute commands which might take a longer time in the background,
and allowing the user thread to check completion status with the check function
Moved to HAL like requested in code review and unit tested with failing commands as well.
Also, Linux HAL components are compiled by default now unless explicitely disabled.
depends on #538
Because of trust issues, Jenkins is using the updated Kenkinsfile from master as implemented in #538.
That means the CI Run now is valid and failed because of a failed unit test.
@ -0,0 +72,4 @@
result = cmdExecutor.check(bytesHaveBeenRead);
REQUIRE(result != CommandExecutor::COMMAND_ERROR);
usleep(500);
REQUIRE(limitIdx < 20);
Catch2 says
"but it works on my machine". All jokes aside, a test which can depend on how fast a particular system is or how it handles separate threads is not ideal. I can just increase the limit for now. This is just a safety mechanism to prevent hang-ups
Okay, this is because
ping
is not installed in the container.