chore(utils): make platform.sh POSIX-safe and fix ShellCheck warnings#387
chore(utils): make platform.sh POSIX-safe and fix ShellCheck warnings#387vnarapar merged 1 commit intoqualcomm-linux:mainfrom
Conversation
non-POSIX disown usage, and quote variables passed to test and kill. These changes address ShellCheck warnings without changing the current runtime flow or behavior. Signed-off-by: Srikanth Muppandam <smuppand@qti.qualcomm.com>
| # Detect Android userland | ||
| ANDROID_PATH=/system/build.prop | ||
| if [ -f $ANDROID_PATH ]; then | ||
| ANDROID=1 |
There was a problem hiding this comment.
This is being used in
qcom-linux-testkit/Runner/utils/basics.sh
Line 220 in 528cc75
There was a problem hiding this comment.
i think platform.sh can be removed along with the recedues in basics.sh if there is no dependency.
There was a problem hiding this comment.
This is being used in
qcom-linux-testkit/Runner/utils/basics.sh
Line 220 in 528cc75
I don't see any of the files importing these functions for use.
git grep -nE 'platform\.sh|basic\.sh|pidkiller|SHELL_CMD|ANDROID_PATH' .
Runner/utils/basics.sh:10:. "${TOOLS}/platform.sh"
Runner/utils/platform.sh:7:ANDROID_PATH=/system/build.prop
Runner/utils/platform.sh:8:if [ -f $ANDROID_PATH ]; then
Runner/utils/platform.sh:11: SHELL_CMD=sh
Runner/utils/platform.sh:15: SHELL_CMD=bash
Runner/utils/platform.sh:18:function pidkiller()
There was a problem hiding this comment.
can we remove platform.sh ?
There was a problem hiding this comment.
can we remove platform.sh ?
Please review the output. The file below still references platform.sh. What steps can we take to remove it? Let it be there for future reference and usage.
Runner/utils/basics.sh:10:. "${TOOLS}/platform.sh"
This PR applies a small lint-only cleanup to Runner/utils/platform.sh.
What is changed:
Why this is needed:
ShellCheck reports non-POSIX and quoting issues in platform.sh. These changes address those warnings while keeping the existing behavior and flow intact.