Remove cache dirs before starting if --rerun=True.

Have Crosperf look for and remove any/all cache entries that match
the current experiment, if the flag --rerun=True was passed, before
starting the run.  This is to prevent cases where the experiment dies
halfway through, leaving half the cache entries 'old' and half the cache
entries 'new' (i.e. leaving cache in an inconsistent state).

BUG=None
TEST=Tested in my directory; verified cache is deleted before run starts
but only when --rerun=True is passed.

Change-Id: I1b03792cba95b30b0270e0f26839618daa70c232
Reviewed-on: https://chrome-internal-review.googlesource.com/229355
Commit-Ready: Caroline Tice <cmtice@google.com>
Tested-by: Caroline Tice <cmtice@google.com>
Reviewed-by: Luis Lozano <llozano@chromium.org>
1 file changed