diff options
| author | 2021-01-29 22:23:09 +0000 | |
|---|---|---|
| committer | 2021-01-29 22:23:09 +0000 | |
| commit | 1dba361c327bd61fa8341cffe0e7573c62a76ce5 (patch) | |
| tree | e1702ddec47172a87514b7c07cdf7e9f8abd3f1b | |
| parent | 493dc2524218997f30f0cc5f84b8961284be7d92 (diff) | |
| parent | 8ded8f51d056fb95715e706356d88f5c5d8a8d77 (diff) | |
Merge "Fixes presubmit test flaky in dumpstate" am: 21474550bc am: 8ded8f51d0
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1560494
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ibcc2345b7433ec2eb823c1837179f53b476208e7
| -rw-r--r-- | cmds/dumpstate/tests/dumpstate_smoke_test.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/cmds/dumpstate/tests/dumpstate_smoke_test.cpp b/cmds/dumpstate/tests/dumpstate_smoke_test.cpp index 0e366cb638..c62d302214 100644 --- a/cmds/dumpstate/tests/dumpstate_smoke_test.cpp +++ b/cmds/dumpstate/tests/dumpstate_smoke_test.cpp @@ -310,8 +310,12 @@ TEST_F(ZippedBugReportContentsTest, ContainsSomeFileSystemFiles) { // FS/proc/*/mountinfo size > 0 FileExists("FS/proc/1/mountinfo", 0U, 100000U); - // FS/data/misc/profiles/cur/0/*/primary.prof size > 0 - FileExists("FS/data/misc/profiles/cur/0/com.android.phone/primary.prof", 0U, 100000U); + // FS/data/misc/profiles/cur/0/*/primary.prof should exist. Also, since dumpstate only adds + // profiles to the zip in the non-user build, a build checking is necessary here. + if (!PropertiesHelper::IsUserBuild()) { + ZipEntry entry; + GetEntry(handle, "FS/data/misc/profiles/cur/0/com.android.phone/primary.prof", &entry); + } } /** |