Linux-Firmware Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH linux-firmware] Makefile: improve `make check` usefulness
@ 2020-02-29  1:32 Brian Norris
  0 siblings, 0 replies; only message in thread
From: Brian Norris @ 2020-02-29  1:32 UTC (permalink / raw)
  To: linux-firmware; +Cc: Brian Norris

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>
---
 Makefile        | 2 +-
 check_whence.py | 6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 16b5b1a02a49..e1c362f36650 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ FIRMWAREDIR = /lib/firmware
 all:
 
 check:
-	./check_whence.py
+	@./check_whence.py
 
 install:
 	mkdir -p $(DESTDIR)$(FIRMWAREDIR)
diff --git a/check_whence.py b/check_whence.py
index 4adbfc30d72d..04f41dfc5f9e 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())
-- 
2.25.0.265.gbab2e86ba0-goog


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-29  1:32 [PATCH linux-firmware] Makefile: improve `make check` usefulness Brian Norris

Linux-Firmware Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-firmware/0 linux-firmware/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-firmware linux-firmware/ https://lore.kernel.org/linux-firmware \
		linux-firmware@kernel.org
	public-inbox-index linux-firmware

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.lore.linux-firmware


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git