Update cleanup script to get chrome temp files too.
Final patch didn't get uploaded last time; here it is.
BUG=None
TEST=Tested updaed script on chrotomation3.
Change-Id: I8abccb8c5ed98b7086dc03bc05bd3d75ae8b6734
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2341096
Reviewed-by: George Burgess <gbiv@chromium.org>
Commit-Queue: Caroline Tice <cmtice@chromium.org>
Tested-by: Caroline Tice <cmtice@chromium.org>
diff --git a/auto_delete_nightly_test_data.py b/auto_delete_nightly_test_data.py
index 0cda051..03d59b2 100755
--- a/auto_delete_nightly_test_data.py
+++ b/auto_delete_nightly_test_data.py
@@ -16,6 +16,7 @@
import os
import re
import shutil
+import shlex
import sys
import time
@@ -217,15 +218,15 @@
'tmp');
cmd = f'rm -fr {shlex.quote(tmp_dir)}/tmp*telemetry_Crosperf'
if dry_run:
- print(f'Going to execute:\n{shlex.quote(cmd)}')
+ print(f'Going to execute:\n{cmd}')
else:
rv = ce.RunCommand(cmd, print_to_console=False)
if rv == 0:
print(f'Successfully cleaned chrome tree tmp directory '
- '"{shlex.quote(tmp_dir)}".'
+ f'{tmp_dir!r} .')
else:
print(f'Some directories were not removed under chrome tree '
- 'tmp directory -"{shlex.quote(tmp_dir)}".')
+ f'tmp directory {tmp_dir!r}.')
return rv