Add check and check-VERSION targets
authorKienan Stewart <kstewart@efficios.com>
Thu, 19 Oct 2023 14:04:42 +0000 (10:04 -0400)
committerKienan Stewart <kstewart@efficios.com>
Thu, 19 Oct 2023 17:34:28 +0000 (13:34 -0400)
The targets allow the checks to be run for each version (`make
check`), or for a given version (`make check-2.13`).

Multiple checks can be run in parallel with `make check -j$(nproc)`

The pass message output of the check script has been updated to
include the input filename in order to make it clearer which file
succeeds when running checks in parallel.

Change-Id: Ia7aceb97dc35f54ffa791daa285d8bce2dd31ca9

Makefile
tools/check.py

index 0271a0db0c21b2794cf26e36664ad09fe10c2053..26b0b6b64e2749c9f9a751d19ee7656593775072 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,7 @@
 CONF = asciidoc.html5.conf
 PREFIX = lttng-docs
 ALLVERSIONS = $(sort $(wildcard 2.*))
+ALLCHECK = $(foreach v, $(ALLVERSIONS), check-$(v))
 
 ASCIIDOC = asciidoc -v -f $(CONF) -a source-highlighter=pygments
 RM = rm -rf
@@ -19,6 +20,11 @@ view-$(1):
        xdg-open $(1)/$(PREFIX)-$(1).html
 
 .PHONY: view-$(1)
+
+check-$(1): $(1)/$(PREFIX)-$(1).txt $(CONF)
+       python3 tools/check.py $(1)/$(PREFIX)-$(1).txt
+
+.PHONY: check-$(1)
 endef
 
 .PHONY: all
@@ -27,6 +33,10 @@ all: $(ALLVERSIONS)
 
 $(foreach v,$(ALLVERSIONS),$(eval $(call vrule,$(v))))
 
+.PHONY: check
+
+check: $(ALLCHECK)
+
 .PHONY: clean
 
 clean:
index 70bd8d5d731266da430f749016df6c310a163d34..0fe2719fc0c0a9bbe1ba00710ebca408ccffc901 100644 (file)
@@ -169,7 +169,7 @@ def _main():
     if checker.has_error:
         return 1
 
-    print(colored('All good!', 'green', attrs=['bold']))
+    print(colored('{}: All good!'.format(args.infile), 'green', attrs=['bold']))
 
     return 0
 
This page took 0.025285 seconds and 4 git commands to generate.