SuspendSepolicyTests: Use target device grep
Some vendors reported issue running the test since thier host
environment was missing the path to grep command.
Use the target device grep instead.
Bug: 381369000
Test: atest SuspendSepolicyTests
Change-Id: Id891e9bcdfe00992b98124319e821d0bbb663282
Signed-off-by: Kalesh Singh <[email protected]>
(cherry picked from commit d3b68657fd3fe2d50238a01cd39073658f8cf031)
(cherry picked from commit 42f7e8dc09a4fc841cf7c7aabc875f22560cc8e5)
diff --git a/suspend/1.0/default/SuspendSepolicyTests.sh b/suspend/1.0/default/SuspendSepolicyTests.sh
index 0dd2a3e..8bab96d 100755
--- a/suspend/1.0/default/SuspendSepolicyTests.sh
+++ b/suspend/1.0/default/SuspendSepolicyTests.sh
@@ -32,7 +32,9 @@
}
has_wakeup_attr() { #path
- adb shell ls -dZ "$1" | grep -q "$wakeup_attr"
+ local _path="$1"
+
+ adb shell "ls -dZ $_path | grep -q $wakeup_attr"
return $?
}