Finish populating the new_hashes map after finding a dirty input.
any_input_dirty would return early when finding a dirty input and not finish
filling the new_hashes map. This would require multiple runs of the code
generation script to fully generate all the outputs.
BUG=angleproject:2695
Change-Id: Ie62190efe2765df432b0a535fb8d33ed2ffa66a7
Reviewed-on: https://chromium-review.googlesource.com/1127439
Commit-Queue: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
diff --git a/scripts/run_code_generation.py b/scripts/run_code_generation.py
index 40f5a86..d4dc576 100755
--- a/scripts/run_code_generation.py
+++ b/scripts/run_code_generation.py
@@ -168,12 +168,13 @@
return hash_md5.hexdigest()
def any_input_dirty(name, inputs):
+ found_dirty_input = False
for finput in inputs:
key = name + ":" + finput
new_hashes[key] = md5(finput)
if (not key in old_hashes) or (old_hashes[key] != new_hashes[key]):
- return True
- return False
+ found_dirty_input = True
+ return found_dirty_input
os.chdir(script_dir)
old_hashes = json.load(open(hash_fname))