diff options
| author | 2023-07-28 17:40:39 +0000 | |
|---|---|---|
| committer | 2023-07-28 17:40:39 +0000 | |
| commit | 14fb28fb83ca4220346d5391bf6ac558b541e19c (patch) | |
| tree | a0b1bcce13ac5a7b1ac8f82ae9bbdbb77ada6b3f /cmds/dumpstate/DumpstateUtil.cpp | |
| parent | c4912c2b9d19b79479ef98e7294463a75a8b1ab3 (diff) | |
| parent | e0f7ccc63d7b5a6b9455d05d901f90770b64bd8e (diff) | |
Merge "Add sysprop for identifying strict-run bugreports" into main am: e0f7ccc63d
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2679475
Change-Id: I5aef2b026af0dce9e8597402c174592fd247d41a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'cmds/dumpstate/DumpstateUtil.cpp')
| -rw-r--r-- | cmds/dumpstate/DumpstateUtil.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cmds/dumpstate/DumpstateUtil.cpp b/cmds/dumpstate/DumpstateUtil.cpp index aa42541a66..615701ccc1 100644 --- a/cmds/dumpstate/DumpstateUtil.cpp +++ b/cmds/dumpstate/DumpstateUtil.cpp @@ -207,6 +207,7 @@ std::string PropertiesHelper::build_type_ = ""; int PropertiesHelper::dry_run_ = -1; int PropertiesHelper::unroot_ = -1; int PropertiesHelper::parallel_run_ = -1; +int PropertiesHelper::strict_run_ = -1; bool PropertiesHelper::IsUserBuild() { if (build_type_.empty()) { @@ -237,6 +238,14 @@ bool PropertiesHelper::IsParallelRun() { return parallel_run_ == 1; } +bool PropertiesHelper::IsStrictRun() { + if (strict_run_ == -1) { + // Defaults to using stricter timeouts. + strict_run_ = android::base::GetBoolProperty("dumpstate.strict_run", true) ? 1 : 0; + } + return strict_run_ == 1; +} + int DumpFileToFd(int out_fd, const std::string& title, const std::string& path) { android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(path.c_str(), O_RDONLY | O_NONBLOCK | O_CLOEXEC))); if (fd.get() < 0) { |