Reland "tauto: Remove crash files before, not after, tests"
Cherry-picking for lab test compatibility
This is a reland of 6d18674daa4ddaff4cdb2ea1641e41af0d1ea7fe
Original change's description:
> tauto: Remove crash files before, not after, tests
>
> This is a follow-up to https://crrev.com/c/2633501 that changes *all*
> cases to remove /var/spool/crash/ before, not after, tests.
>
> BUG=chromium:1107005
> TEST=CQ
>
> Change-Id: Ic5da8aa3a32d6483d1e2377d166a677e005d49b3
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2809196
> Commit-Queue: Miriam Zimmerman <mutexlox@chromium.org>
> Commit-Queue: Allen Li <ayatane@chromium.org>
> Tested-by: Miriam Zimmerman <mutexlox@chromium.org>
> Auto-Submit: Miriam Zimmerman <mutexlox@chromium.org>
> Reviewed-by: Allen Li <ayatane@chromium.org>
Bug: chromium:1107005
Cq-Depend: chromium:2844811
Change-Id: I85117677e0b93986e1ef2e3a93ea76c86cae6475
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/autotest/+/2844812
Tested-by: Derek Beckett <dbeckett@chromium.org>
Auto-Submit: Derek Beckett <dbeckett@chromium.org>
Reviewed-by: Miriam Zimmerman <mutexlox@chromium.org>
Commit-Queue: Miriam Zimmerman <mutexlox@chromium.org>
diff --git a/client/bin/site_sysinfo.py b/client/bin/site_sysinfo.py
index 399bed9..4bc2048 100755
--- a/client/bin/site_sysinfo.py
+++ b/client/bin/site_sysinfo.py
@@ -351,9 +351,10 @@
self.test_loggables.add(
logfile(os.path.join(constants.USER_DATA_DIR,
".Google/Google Talk Plugin/gtbplugin.log")))
- self.test_loggables.add(purgeable_logdir(
- constants.CRASH_DIR,
- excludes=logdir.DEFAULT_EXCLUDES + (crash_exclude_string,)))
+ self.test_loggables.add(
+ purged_on_init_logdir(constants.CRASH_DIR,
+ excludes=logdir.DEFAULT_EXCLUDES +
+ (crash_exclude_string, )))
# Collect files under /tmp/crash_reporter, which contain the procfs
# copy of those crashed processes whose core file didn't get converted
# into minidump. We need these additional files for post-mortem analysis