Skip to content

Commit

Permalink
Remove shell command comments from the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffLIrion committed Sep 6, 2019
1 parent 6035681 commit 831f649
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
6 changes: 0 additions & 6 deletions tests/test_androidtv.py
Expand Up @@ -16,7 +16,6 @@
from . import patchers


# `adb shell dumpsys audio`
DUMPSYS_AUDIO_OFF = """MediaFocusControl dump time: 9:00:59 AM
Audio Focus stack entries (last is top of stack):
Expand Down Expand Up @@ -140,7 +139,6 @@
muted player piids:"""


# `dumpsys audio | grep '\- STREAM_MUSIC:' -A 12`
STREAM_MUSIC_OFF = """- STREAM_MUSIC:
Muted: false
Min: 0
Expand Down Expand Up @@ -278,7 +276,6 @@
muted player piids:"""


# `dumpsys audio | grep '\- STREAM_MUSIC:' -A 12`
STREAM_MUSIC_ON = """- STREAM_MUSIC:
Muted: false
Min: 0
Expand All @@ -293,7 +290,6 @@
Devices: speaker"""


# `dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\c' && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio`
GET_PROPERTIES_OUTPUT1 = ""
GET_PROPERTIES_DICT1 = {'screen_on': False,
'awake': False,
Expand All @@ -306,7 +302,6 @@
'volume': None}
STATE1 = (constants.STATE_OFF, None, None, None, None)

# `dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\c' && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio`
GET_PROPERTIES_OUTPUT2 = "1"
GET_PROPERTIES_DICT2 = {'screen_on': True,
'awake': False,
Expand All @@ -319,7 +314,6 @@
'volume': None}
STATE2 = (constants.STATE_IDLE, None, None, None, None)

# `dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\c' && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && dumpsys audio`
GET_PROPERTIES_OUTPUT3 = """110Wake Locks: size=2
com.amazon.tv.launcher
Expand Down
3 changes: 0 additions & 3 deletions tests/test_basetv.py
Expand Up @@ -11,7 +11,6 @@
from . import patchers


# `adb shell getprop ro.product.manufacturer && getprop ro.product.model && getprop ro.serialno && getprop ro.build.version.release && ip addr show wlan0 | grep -m 1 ether && ip addr show eth0 | grep -m 1 ether`
DEVICE_PROPERTIES_OUTPUT1 = """Amazon
AFTT
SERIALNO
Expand Down Expand Up @@ -57,10 +56,8 @@
'wifimac': None,
'ethmac': 'ab:cd:ef:gh:ij:kl'}

# `adb shell CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {'`
MEDIA_SESSION_STATE_OUTPUT = "com.amazon.tv.launcher\nstate=PlaybackState {state=2, position=0, buffered position=0, speed=0.0, updated=65749, actions=240640, custom actions=[], active item id=-1, error=null}"

# `adb shell ps | grep u0_a`
RUNNING_APPS_OUTPUT = """u0_a18 316 197 1189204 115000 ffffffff 00000000 S com.netflix.ninja
u0_a2 15121 197 998628 24628 ffffffff 00000000 S com.amazon.device.controllermanager"""

Expand Down
6 changes: 0 additions & 6 deletions tests/test_firetv.py
Expand Up @@ -16,12 +16,8 @@
from . import patchers




# `adb shell CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP`
CURRENT_APP_OUTPUT = "com.amazon.tv.launcher"

# `adb shell dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\c' && dumpsys power | grep Locks | grep 'size=' && (dumpsys media_session | grep -m 1 'state=PlaybackState {' || echo) && dumpsys window windows | grep mCurrentFocus && ps | grep u0_a`
GET_PROPERTIES_OUTPUT1 = ""
GET_PROPERTIES_DICT1 = {'screen_on': False,
'awake': False,
Expand All @@ -31,7 +27,6 @@
'running_apps': None}
STATE1 = (constants.STATE_OFF, None, None)

# `adb shell dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\c' && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && ps | grep u0_a`
GET_PROPERTIES_OUTPUT2 = "1"
GET_PROPERTIES_DICT2 = {'screen_on': True,
'awake': False,
Expand All @@ -41,7 +36,6 @@
'running_apps': None}
STATE2 = (constants.STATE_IDLE, None, None)

# `adb shell dumpsys power | grep 'Display Power' | grep -q 'state=ON' && echo -e '1\c' && dumpsys power | grep mWakefulness | grep -q Awake && echo -e '1\c' && dumpsys power | grep Locks | grep 'size=' && CURRENT_APP=$(dumpsys window windows | grep mCurrentFocus) && CURRENT_APP=${CURRENT_APP#*{* * } && CURRENT_APP=${CURRENT_APP%%/*} && echo $CURRENT_APP && (dumpsys media_session | grep -A 100 'Sessions Stack' | grep -A 100 $CURRENT_APP | grep -m 1 'state=PlaybackState {' || echo) && ps | grep u0_a`
GET_PROPERTIES_OUTPUT3 = """11Wake Locks: size=2
com.amazon.tv.launcher
Expand Down

0 comments on commit 831f649

Please sign in to comment.