diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-02-08 15:31:54 +0100 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-02-08 17:51:15 +0100 |
commit | 511d70166d73fa07f3b275f6d206c107bb194a19 (patch) | |
tree | 84be2fd897afeb2781ccae3fdf7a5e47dfacce8f /generate_auto_job | |
parent | cb769c62e55599e9f980001830bc61d9fcaa64a9 (diff) | |
download | qpdf-511d70166d73fa07f3b275f6d206c107bb194a19.tar.zst |
Check generated QPDFJob files in CI
This is to catch pull requests that make changes that would affect
automatically generated job files without including those
modifications.
Diffstat (limited to 'generate_auto_job')
-rwxr-xr-x | generate_auto_job | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/generate_auto_job b/generate_auto_job index 64ad7364..fe4e9392 100755 --- a/generate_auto_job +++ b/generate_auto_job @@ -247,6 +247,21 @@ class Main: if m: old_hashes[m.group(1)] = m.group(2) match = old_hashes == hashes + if not match: + # Write to stdout, not stderr. What we write to stderr + # is visible in a normal build. Writing to stdout will + # hide it in that case but expose it if you directly + # run ./generate_auto_job --check as in CI. + print(f'*** {whoami} hash mismatches ***') + match = False + for k, v in hashes.items(): + if k not in old_hashes: + print(f' {k} is not in job.sums') + elif v != old_hashes[k]: + print(f' {k} was modified') + for k in old_hashes: + if k not in hashes: + print(f' {k} disappeared') except Exception: pass return match |