Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91eb2c0a authored by Mark Salyzyn's avatar Mark Salyzyn
Browse files

adb-remount-test add --no-wait-screen option

If the device screen drivers or frameworks are compromised, permit
remount testing without waiting for full boot complete to occur with
the --no-wait-screen option.  In the same vein to support development,
add --wait-adb and --wait-fastboot options to adjust the timeout.

For TreeHugger testing where other (previous) tests demonstrate
framework or screen regressions, it _may_ be advised to switch to the
--no-wait-screen option so that we do not register a false signal.
It should be noted that some of the past issues with overlayfs and
adb remount could introduce boot up, framework or screen regressions,
so it is advised to not use the option if that interlocking logic can
not be set up.

Test: adb-remount-test.sh
Bug: 138649540
Change-Id: Idf8f4a0eb6d7c9139bd4f2c600d14a70dc71902f
parent e1d4e390
Loading
Loading
Loading
Loading
+29 −4
Original line number Diff line number Diff line
@@ -15,10 +15,13 @@ USAGE="USAGE: `basename ${0}` [--help] [--serial <SerialNumber>] [options]

adb remount tests

--help        This help
--serial      Specify device (must if multiple are present)
--color                     Dress output with highlighting colors
--help                      This help
--no-wait-screen            Do not wait for display screen to settle
--print-time                Report the test duration
--serial                    Specify device (must if multiple are present)
--wait-adb <duration>       adb wait timeout
--wait-fastboot <duration>  fastboot wait timeout

Conditions:
 - Must be a userdebug build.
@@ -53,6 +56,7 @@ ACTIVE_SLOT=

ADB_WAIT=4m
FASTBOOT_WAIT=2m
screen_wait=true

##
##  Helper Functions
@@ -436,6 +440,10 @@ wait_for_screen_timeout=900
-n - echo newline at exit
TIMEOUT - default `format_duration ${wait_for_screen_timeout}`" ]
wait_for_screen() {
  if ! ${screen_wait}; then
    adb_wait
    return
  fi
  exit_function=true
  if [ X"-n" = X"${1}" ]; then
    exit_function=echo
@@ -743,6 +751,9 @@ skip_unrelated_mounts() {

OPTIONS=`getopt --alternative --unquoted \
                --longoptions help,serial:,colour,color,no-colour,no-color \
                --longoptions wait-adb:,wait-fastboot: \
                --longoptions wait-screen,wait-display \
                --longoptions no-wait-screen,no-wait-display \
                --longoptions gtest_print_time,print-time \
                -- "?hs:" ${*}` ||
  ( echo "${USAGE}" >&2 ; false ) ||
@@ -766,9 +777,23 @@ while [ ${#} -gt 0 ]; do
    --no-color | --no-colour)
      color=false
      ;;
    --no-wait-display | --no-wait-screen)
      screen_wait=false
      ;;
    --wait-display | --wait-screen)
      screen_wait=true
      ;;
    --print-time | --gtest_print_time)
      print_time=true
      ;;
    --wait-adb)
      ADB_WAIT=${2}
      shift
      ;;
    --wait-fastboot)
      FASTBOOT_WAIT=${2}
      shift
      ;;
    --)
      shift
      break