summaryrefslogtreecommitdiff
path: root/dexopt_chroot_setup
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2024-04-12 17:50:59 +0100
committer Jiakai Zhang <jiakaiz@google.com> 2024-04-12 17:50:59 +0100
commit3f29f3783b1c7efeda047119ee6fdad5bcc06238 (patch)
tree403096955fe3b19b0b6dfca3d64400dc606778c8 /dexopt_chroot_setup
parent013d57de571fbcff26f5692f3206d3f771d7e11b (diff)
Wait for the boot to complete before running dexopt_chroot_setup_test.
Bug: 334006380 Test: atest art_standalone_dexopt_chroot_setup_tests Change-Id: I7e232436fa857644208df66f514551e9c04b2413
Diffstat (limited to 'dexopt_chroot_setup')
-rw-r--r--dexopt_chroot_setup/dexopt_chroot_setup_test.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/dexopt_chroot_setup/dexopt_chroot_setup_test.cc b/dexopt_chroot_setup/dexopt_chroot_setup_test.cc
index 4457de343c..9ee33dfece 100644
--- a/dexopt_chroot_setup/dexopt_chroot_setup_test.cc
+++ b/dexopt_chroot_setup/dexopt_chroot_setup_test.cc
@@ -24,6 +24,7 @@
#include <string_view>
#include "aidl/com/android/server/art/BnDexoptChrootSetup.h"
+#include "android-base/properties.h"
#include "android-base/scopeguard.h"
#include "android/binder_auto_utils.h"
#include "base/common_art_test.h"
@@ -40,6 +41,7 @@ namespace dexopt_chroot_setup {
namespace {
using ::android::base::ScopeGuard;
+using ::android::base::WaitForProperty;
using ::art::tools::CmdlineBuilder;
class DexoptChrootSetupTest : public CommonArtTest {
@@ -72,6 +74,8 @@ class DexoptChrootSetupTest : public CommonArtTest {
GTEST_SKIP() << "A real Pre-reboot Dexopt is running";
}
+ ASSERT_TRUE(WaitForProperty("dev.bootcomplete", "1", /*timeout=*/std::chrono::minutes(3)));
+
test_skipped = false;
scratch_dir_ = std::make_unique<ScratchDir>();