From 68c97406a2edb882533df4b9a92308e5e0e4a557 Mon Sep 17 00:00:00 2001 From: Bowgo Tsai Date: Mon, 10 Jan 2022 15:49:52 +0800 Subject: [PATCH] libfs_avb: updating run_tests.sh Adding `--host` for host-side test cases with atest, so we still can run the test when there is no device connected. Otherwise, TradeFed will emit the follow error: TradeFed subprocess exited early with exit code=7(NO_DEVICE_ALLOCATED). Bug: None Test: ./system/core/fs_mgr/libfs_avb/run_tests.sh Change-Id: I0a593e6dc42861c2dc9cfff308cd7fd76b39ef2c --- fs_mgr/libfs_avb/run_tests.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/fs_mgr/libfs_avb/run_tests.sh b/fs_mgr/libfs_avb/run_tests.sh index 5d2ce3df6..3e945a4b1 100755 --- a/fs_mgr/libfs_avb/run_tests.sh +++ b/fs_mgr/libfs_avb/run_tests.sh @@ -1,8 +1,13 @@ #!/bin/sh # # Run host tests -atest libfs_avb_test # Tests public libfs_avb APIs. -atest libfs_avb_internal_test # Tests libfs_avb private APIs. +atest --host libfs_avb_test # Tests public libfs_avb APIs. + +# Tests libfs_avb private APIs. +# The tests need more time to finish, so increase the timeout to 5 mins. +# The default timeout is only 60 seconds. +atest --host libfs_avb_internal_test -- --test-arg \ + com.android.tradefed.testtype.HostGTest:native-test-timeout:5m # Run device tests atest libfs_avb_device_test # Test public libfs_avb APIs on a device.