Run unit tests if verity has already been disabled

[ Merge of http://go/wvgerrit/192930 ]

The script to run unit/integration tests aborts if an adb remount
command indicates that verity needs to be run. This just checks
for presence of the string "verity" in the output. Some devices
output "Verity is already disabled". The test script should not
abort the run in this scenario.

Bug: 327421750
Test: ./build_and_run_all_tests.sh
Change-Id: Ic953f25aba31be0ca527bc000f433d8c9076effa
This commit is contained in:
Rahul Frias
2024-02-28 09:44:13 -08:00
parent 72ad929dc8
commit b0203576c4
2 changed files with 2 additions and 2 deletions

View File

@@ -84,7 +84,7 @@ m -j $NUM_CORES $WV_UNITTESTS
echo "waiting for device"
ADB_OUTPUT=`adb $SERIAL_NUM root && echo ". " && adb $SERIAL_NUM wait-for-device remount`
echo $ADB_OUTPUT
if echo $ADB_OUTPUT | grep -qi "verity"; then
if echo $ADB_OUTPUT | grep -qi "verity" | grep -vi "Verity is already disabled"; then
echo
echo "ERROR: This device has Verity enabled. build_and_run_all_unit_tests.sh "
echo "does not work if Verity is enabled. Please disable Verity with"

View File

@@ -68,7 +68,7 @@ fi
echo "waiting for device"
ADB_OUTPUT=`adb $SERIAL_NUM root && echo ". " && adb $SERIAL_NUM wait-for-device remount`
echo $ADB_OUTPUT
if echo $ADB_OUTPUT | grep -qi "verity"; then
if echo $ADB_OUTPUT | grep -qi "verity" | grep -vi "Verity is already disabled"; then
echo
echo "ERROR: This device has Verity enabled. run_all_unit_tests.sh does not "
echo "work if Verity is enabled. Please disable Verity with"