Skip to content

Commit 15ed65e

Browse files
committed
cvdr create E2E tests check ADB connection and cvdr list
1 parent 8ca314e commit 15ed65e

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

e2etests/cvdr/cvdr_create_with_branch_test.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,19 @@ cvdr create \
1414
--host=${HOSTNAME} \
1515
--branch=aosp-android-latest-release \
1616
--build_target=aosp_cf_x86_64_only_phone-userdebug
17+
18+
# Check the output of cvdr list
19+
# TODO(b/448007486): cvdr list should print proper URL instead of showing <nil>.
20+
# TODO(b/448007486): cvdr list should print proper ADB connection status.
21+
ACTUAL_OUTPUT=$(cvdr list --host ${HOSTNAME})
22+
EXPECTED_OUTPUT="${HOSTNAME} (<nil>/)
23+
cvd/1
24+
Status: Running
25+
ADB: not connected
26+
Displays: [720 x 1280 ( 320 )]
27+
Logs: <nil>/cvds/cvd/1/logs/"
28+
diff <(echo ${EXPECTED_OUTPUT}) <(echo ${ACTUAL_OUTPUT})
29+
30+
# Check ADB connection
31+
# TODO(b/448007486): Retrieve serial of the device from the output of cvdr list.
32+
adb shell uptime

e2etests/cvdr/cvdr_create_with_local_srcs_test.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,19 @@ cvdr create \
2525
--host=${HOSTNAME} \
2626
--local_cvd_host_pkg_src=${CVD_HOST_PKG} \
2727
--local_images_zip_src=${IMAGE_ZIP}
28+
29+
# Check the output of cvdr list
30+
# TODO(b/448007486): cvdr list should print proper URL instead of showing <nil>.
31+
# TODO(b/448007486): cvdr list should print proper ADB connection status.
32+
ACTUAL_OUTPUT=$(cvdr list --host ${HOSTNAME})
33+
EXPECTED_OUTPUT="${HOSTNAME} (<nil>/)
34+
cvd_1/1
35+
Status: Running
36+
ADB: not connected
37+
Displays: [720 x 1280 ( 320 )]
38+
Logs: <nil>/cvds/cvd_1/1/logs/"
39+
diff <(echo ${EXPECTED_OUTPUT}) <(echo ${ACTUAL_OUTPUT})
40+
41+
# Check ADB connection
42+
# TODO(b/448007486): Retrieve serial of the device from the output of cvdr list.
43+
adb shell uptime

0 commit comments

Comments
 (0)