diff mbox

[i-g-t,2/2] docs: Include subtest documentation

Message ID 1502278850-13991-2-git-send-email-petri.latvala@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Petri Latvala Aug. 9, 2017, 11:40 a.m. UTC
A simple and naive format: Double newline denotes paragraph change,
otherwise insert subtest documentation into the generated docs as-is.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
---


This works for me, but I don't know if the generated docs are actually
valid docbook xml.



docs/reference/intel-gpu-tools/Makefile.am | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox

Patch

diff --git a/docs/reference/intel-gpu-tools/Makefile.am b/docs/reference/intel-gpu-tools/Makefile.am
index ee1e900..2407e37 100644
--- a/docs/reference/intel-gpu-tools/Makefile.am
+++ b/docs/reference/intel-gpu-tools/Makefile.am
@@ -56,6 +56,12 @@  xml/igt_test_programs_%_description.xml: $(TESTLISTS)
 				for subtest in $$subtest_list; do \
 					echo "<member>" >> $@; \
 					echo "$$subtest" | perl -pe 's/\b$(KEYWORDS)\b/<acronym>\1<\/acronym>/g' >> $@; \
+					subtest_doc=`./$$testprog --document-subtest $$subtest`; \
+					if [ -n "$$subtest_doc" ]; then \
+						echo "<para><![CDATA[" >> $@; \
+						echo "$$subtest_doc" | sed ':a;N;$$!ba;s,\n\n,]]></para><para><![CDATA[,g'>> $@; \
+						echo "]]></para>" >> $@; \
+					fi; \
 					echo "</member>" >> $@; \
 				done; \
 				echo "</simplelist>" >> $@; \