summaryrefslogtreecommitdiff
path: root/check_whence.py
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2020-02-28 17:32:48 -0800
committerJosh Boyer <jwboyer@kernel.org>2020-03-02 08:06:26 -0500
commit7fa32bcc68a3c7a9496c49bdb10f1fdc68cf5ddb (patch)
tree86a55c6b01daab554c603f2c17cea8bf087f4294 /check_whence.py
parent4bb6805bdac4bf3990a4a1408304624e5d9a9082 (diff)
downloadlinux-firmware-7fa32bcc68a3c7a9496c49bdb10f1fdc68cf5ddb.tar.gz
linux-firmware-7fa32bcc68a3c7a9496c49bdb10f1fdc68cf5ddb.tar.xz
Makefile: improve `make check` usefulness
Silence the make echo'ing, so the output is cleaner. Add an exit code to check_whence.py, so we can get a real failure for bad WHENCE files. Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Josh Boyer <jwboyer@kernel.org>
Diffstat (limited to 'check_whence.py')
-rwxr-xr-xcheck_whence.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/check_whence.py b/check_whence.py
index 4adbfc3..04f41df 100755
--- a/check_whence.py
+++ b/check_whence.py
@@ -33,6 +33,7 @@ def list_git():
yield line.rstrip('\n')
def main():
+ ret = 0
whence_list = list(list_whence())
known_files = set(name for name in whence_list if not name.endswith('/')) | \
set(['check_whence.py', 'configure', 'Makefile',
@@ -42,6 +43,7 @@ def main():
for name in sorted(list(known_files - git_files)):
sys.stderr.write('E: %s listed in WHENCE does not exist\n' % name)
+ ret = 1
for name in sorted(list(git_files - known_files)):
# Ignore subdirectory changelogs and GPG detached signatures
@@ -55,6 +57,8 @@ def main():
break
else:
sys.stderr.write('E: %s not listed in WHENCE\n' % name)
+ ret = 1
+ return ret
if __name__ == '__main__':
- main()
+ sys.exit(main())

Generated by cgit