aboutsummaryrefslogtreecommitdiff
path: root/test_toolchains.py
diff options
context:
space:
mode:
authorcmtice <cmtice@google.com>2014-07-08 11:17:21 -0700
committerchrome-internal-fetch <chrome-internal-fetch@google.com>2014-07-08 21:22:40 +0000
commit4536ef6c9da0f8c0c544552798c0bcf516519f73 (patch)
tree0351ea39d0241eaeeb05d6a45ef6080b7bcbd7a4 /test_toolchains.py
parent6367e17c2a01a67fe015f4a94a1cbb30d7958dfc (diff)
downloadtoolchain-utils-4536ef6c9da0f8c0c544552798c0bcf516519f73.tar.gz
Minor fixes to weekly report generation.
Update test_toolchains.py to clean out old (stale) data before copying current image tar files to reports directory. Update weekly_report.py to generate report for previous 6 days, depending on when report is run, rather than being hard-coded to start the report on a particular day. BUG=Non TEST=Ran test_toolchains.py as part of nightly test; it worked properly. Ran weekly_report.py and it did the right thing. Change-Id: Id173ccaa3146c76e19636501984bab11a41f8568 Reviewed-on: https://chrome-internal-review.googlesource.com/168465 Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Caroline Tice <cmtice@google.com> Tested-by: Caroline Tice <cmtice@google.com>
Diffstat (limited to 'test_toolchains.py')
-rw-r--r--test_toolchains.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test_toolchains.py b/test_toolchains.py
index 57051e7e..aae035a1 100644
--- a/test_toolchains.py
+++ b/test_toolchains.py
@@ -248,6 +248,10 @@ class ToolchainComparator(ChromeOSCheckout):
dest_dir = os.path.join (data_dir, weekday)
if not os.path.exists(dest_dir):
os.makedirs(dest_dir)
+ # Make sure dest_dir is empty (clean out last week's data).
+ cmd = "cd %s; rm -Rf %s_*_image*" % (dest_dir, weekday)
+ self._ce.RunCommand(cmd)
+ # Now create new tar files and copy them over.
for l in labels:
test_path = os.path.join(images_path, l)
if os.path.exists(test_path):