diff options
author | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-06 14:22:24 +0000 |
---|---|---|
committer | maruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-07-06 14:22:24 +0000 |
commit | d7a1aa1101c53e639ca13d9d013a805fc836eedb (patch) | |
tree | b49b0812b53152d45b1d234010da43c2f71a700b /tools | |
parent | 803025b6f313c78adf232e10cdbe65d2ec69f287 (diff) | |
download | chromium_src-d7a1aa1101c53e639ca13d9d013a805fc836eedb.zip chromium_src-d7a1aa1101c53e639ca13d9d013a805fc836eedb.tar.gz chromium_src-d7a1aa1101c53e639ca13d9d013a805fc836eedb.tar.bz2 |
Make isolate.py succeed even if the .results to be archived already exist.
TBR=cmp@chromium.org
NOTRY=true
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10701107
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@145590 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/isolate/isolate.py | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/isolate/isolate.py b/tools/isolate/isolate.py index 13e5a6f..2c1100e 100755 --- a/tools/isolate/isolate.py +++ b/tools/isolate/isolate.py @@ -668,10 +668,17 @@ def CMDhashtable(args): result_hash = hashlib.sha1(f.read()).hexdigest() logging.info( '%s -> %s' % (os.path.basename(complete_state.result_file), result_hash)) + outfile = os.path.join(options.outdir, result_hash) + if os.path.isfile(outfile): + # Just do a quick check that the file size matches. If they do, skip the + # archive. This mean the build result didn't change at all. + out_size = os.stat(outfile).st_size + in_size = os.stat(complete_state.result_file).st_size + if in_size == out_size: + return + run_test_from_archive.link_file( - os.path.join(options.outdir, result_hash), - complete_state.result_file, - run_test_from_archive.HARDLINK) + outfile, complete_state.result_file, run_test_from_archive.HARDLINK) return 0 |