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>
This commit is contained in:
parent
4bb6805bda
commit
7fa32bcc68
2
Makefile
2
Makefile
|
@ -6,7 +6,7 @@ FIRMWAREDIR = /lib/firmware
|
||||||
all:
|
all:
|
||||||
|
|
||||||
check:
|
check:
|
||||||
./check_whence.py
|
@./check_whence.py
|
||||||
|
|
||||||
install:
|
install:
|
||||||
mkdir -p $(DESTDIR)$(FIRMWAREDIR)
|
mkdir -p $(DESTDIR)$(FIRMWAREDIR)
|
||||||
|
|
|
@ -33,6 +33,7 @@ def list_git():
|
||||||
yield line.rstrip('\n')
|
yield line.rstrip('\n')
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
ret = 0
|
||||||
whence_list = list(list_whence())
|
whence_list = list(list_whence())
|
||||||
known_files = set(name for name in whence_list if not name.endswith('/')) | \
|
known_files = set(name for name in whence_list if not name.endswith('/')) | \
|
||||||
set(['check_whence.py', 'configure', 'Makefile',
|
set(['check_whence.py', 'configure', 'Makefile',
|
||||||
|
@ -42,6 +43,7 @@ def main():
|
||||||
|
|
||||||
for name in sorted(list(known_files - git_files)):
|
for name in sorted(list(known_files - git_files)):
|
||||||
sys.stderr.write('E: %s listed in WHENCE does not exist\n' % name)
|
sys.stderr.write('E: %s listed in WHENCE does not exist\n' % name)
|
||||||
|
ret = 1
|
||||||
|
|
||||||
for name in sorted(list(git_files - known_files)):
|
for name in sorted(list(git_files - known_files)):
|
||||||
# Ignore subdirectory changelogs and GPG detached signatures
|
# Ignore subdirectory changelogs and GPG detached signatures
|
||||||
|
@ -55,6 +57,8 @@ def main():
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
sys.stderr.write('E: %s not listed in WHENCE\n' % name)
|
sys.stderr.write('E: %s not listed in WHENCE\n' % name)
|
||||||
|
ret = 1
|
||||||
|
return ret
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
sys.exit(main())
|
||||||
|
|
Loading…
Reference in New Issue