Commit 0ade8e88 by Jamie Madill Committed by Commit Bot

Use time tolerance in run_code_generation check.

The mtime values I was seeing on my file system were sometimes floating point numbers that were very very close but not exactly the same. This might be due to numerical errors. Increasing the tolerance to something still very small, precision is less than a second. It will lead to fewer rebuilds of non-dirty files. Bug: angleproject:2455 Change-Id: I95dc3214ee91af7a70a20cc625405e0e2bc18698 Reviewed-on: https://chromium-review.googlesource.com/1032855Reviewed-by: 's avatarLuc Ferron <lucferron@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent b90779eb
...@@ -204,7 +204,8 @@ for name, info in sorted(generators.iteritems()): ...@@ -204,7 +204,8 @@ for name, info in sorted(generators.iteritems()):
dirty = True dirty = True
else: else:
output_mtime = os.path.getmtime(foutput) output_mtime = os.path.getmtime(foutput)
if input_mtime > output_mtime: # Use a fuzzy comparison to avoid tiny time delta errors.
if input_mtime - output_mtime > 0.1:
dirty = True dirty = True
if dirty: if dirty:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment