Skip to content

Commit

Permalink
Fix Makefile rule precedence and repair canonical.xml test to work wi…
Browse files Browse the repository at this point in the history
…th yestest. Fixes #671. Commit ready for merge.

 - Legacy-Id: 4040
  • Loading branch information
jennifer-richards committed Aug 31, 2021
1 parent d34fa80 commit 9e59346
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 59 deletions.
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ CHECKOUTPUT= \
@echo " Diffing .plain.text against regular .text"
@doc=$(basename $@); diff -u -I '$(datetime_regex)' -I '$(version_regex)' -I '$(libversion_regex)' -I '$(date_regex)' $$doc.plain.text $$doc.text || { echo 'Diff failed for $$doc.plain.text output'; exit 1; }

# keep this ahead of the tests/out/%.html rule so it takes precedence for pre-3.82 GNU make, which used
# the first matching rule instead of the shortest stem
tests/out/%.canonical.html: tests/input/%.canonical.xml install
@echo " Checking generation of .html from canonical prepped .xml"
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --out $(basename $@).html --html --external-css --external-js --legacy-date-format --no-inline-version $<" 2> /dev/null || { err=$$?; echo "Error output when generating .html from canonical prepped .xml"; exit $$err; }

tests/out/%.txt tests/out/%.raw.txt tests/out/%.nroff tests/out/%.html tests/out/%.txt : tests/input/%.xml install
@echo -e "\n Processing $<"
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --base tests/out/ --raw --legacy --text --nroff --html --strict $<"
Expand All @@ -131,11 +137,6 @@ tests/out/%.prepped.xml: tests/input/%.xml tests/out/%.v3.$(py).html tests/out/%
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --out $(basename $@).text --text --no-pagination --external-css --external-js --legacy-date-format $@" 2> /dev/null || { err=$$?; echo "Error output when generating .text from prepped .xml"; exit $$err; }
@diff -u -I '$(datetime_regex)' -I '$(version_regex)' -I '$(date_regex)' -I '$(generator_regex)' -I 'rel="alternate"' tests/out/$(notdir $(basename $(basename $@))).text $(basename $@).text || { echo "Diff failed for $(basename $@).text output (3)"; exit 1; }

tests/out/%.canonical.html: tests/input/%.canonicalxml install
@echo " Checking generation of .html from canonical prepped .xml"
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --out $(basename $@).$(py).html --html --external-css --external-js --legacy-date-format --no-inline-version $<" 2> /dev/null || { err=$$?; echo "Error output when generating .html from canonical prepped .xml"; exit $$err; }
@diff -u -I '$(datetime_regex)' -I '$(version_regex)' -I '$(date_regex)' -I '$(generator_regex)' -I 'rel="alternate"' tests/valid/$(notdir $(basename $(basename $@))).html $(basename $@).$(py).html || { echo "Diff failed for $(basename $@).$(py).html output (2)"; exit 1; }

tests/out/docfile.xml:
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --doc --out $@"

Expand Down Expand Up @@ -212,7 +213,7 @@ cachetest: cleantmp install
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --cache .cache tests/input/rfc6787.xml --no-network --base tmp/ --raw --legacy"


rfctest: cleantmp env/bin/python install $(rfctests) tests/out/rfc9001.canonical.html
rfctest: cleantmp env/bin/python install $(rfctests) tests/out/rfc9001.canonical.html.test

drafttest: cleantmp env/bin/python install $(drafttests) dateshifttest

Expand Down
File renamed without changes.
12 changes: 6 additions & 6 deletions tests/valid/docfile.py36.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<meta charset="utf-8">
<meta content="Cherokee,Common,Greek,Latin" name="scripts">
<meta content="initial-scale=1.0" name="viewport">
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.9.1</title>
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.10.0rc1</title>
<meta content="xml2rfc(1)" name="author">
<meta content="
This document provides information about the XML schema implemented in this release of xml2rfc, and the individual elements of that schema. The document is generated from the RNG schema file that is part of the xml2rfc distribution, so schema information in this document should always be in sync with the schema in actual use. The textual descriptions depend on manual updates in order to reflect the implementation.
" name="description">
<meta content="xml2rfc 3.9.1" name="generator">
<meta content="xml2rfc-docs-3.9.1" name="ietf.draft">
<meta content="xml2rfc 3.10.0rc1" name="generator">
<meta content="xml2rfc-docs-3.10.0rc1" name="ietf.draft">
<link href="tests/out/docfile.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
<link href="xml2rfc.css" rel="stylesheet">
Expand Down Expand Up @@ -45,7 +45,7 @@
</dd>
</dl>
</div>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.9.1</h1>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.10.0rc1</h1>
<section id="section-abstract">
<h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2>
<p id="section-abstract-1">
Expand Down Expand Up @@ -367,7 +367,7 @@ <h2 id="name-introduction">
<p id="section-1-5">
The latest version of this documentation is available in HTML form at <span><a href="https://xml2rfc.ietf.org/xml2rfc-doc">https://xml2rfc.ietf.org/xml2rfc-doc</a></span>.<a href="#section-1-5" class="pilcrow"></a></p>
<p id="section-1-6">
This documentation applies to xml2rfc version 3.9.1.<a href="#section-1-6" class="pilcrow"></a></p>
This documentation applies to xml2rfc version 3.10.0rc1.<a href="#section-1-6" class="pilcrow"></a></p>
</section>
<section id="section-2">
<h2 id="name-schema-version-3-elements">
Expand Down Expand Up @@ -6333,7 +6333,7 @@ <h2 id="name-xml2rfc-documentation-templ">
<p id="appendix-D-1">

The following variables are available for use in an xml2rfc
manpage Jinja2 template, as of xml2rfc version 3.9.1:<a href="#appendix-D-1" class="pilcrow"></a></p>
manpage Jinja2 template, as of xml2rfc version 3.10.0rc1:<a href="#appendix-D-1" class="pilcrow"></a></p>
<span class="break"></span><dl class="dlNewline" id="appendix-D-2">
<dt id="appendix-D-2.1">{{ bare_latin_tags }}:</dt>
<dd style="margin-left: 1.5em" id="appendix-D-2.2"></dd>
Expand Down
12 changes: 6 additions & 6 deletions tests/valid/docfile.py37.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<meta charset="utf-8">
<meta content="Cherokee,Common,Greek,Latin" name="scripts">
<meta content="initial-scale=1.0" name="viewport">
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.9.1</title>
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.10.0rc1</title>
<meta content="xml2rfc(1)" name="author">
<meta content="
This document provides information about the XML schema implemented in this release of xml2rfc, and the individual elements of that schema. The document is generated from the RNG schema file that is part of the xml2rfc distribution, so schema information in this document should always be in sync with the schema in actual use. The textual descriptions depend on manual updates in order to reflect the implementation.
" name="description">
<meta content="xml2rfc 3.9.1" name="generator">
<meta content="xml2rfc-docs-3.9.1" name="ietf.draft">
<meta content="xml2rfc 3.10.0rc1" name="generator">
<meta content="xml2rfc-docs-3.10.0rc1" name="ietf.draft">
<link href="tests/out/docfile.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
<link href="xml2rfc.css" rel="stylesheet">
Expand Down Expand Up @@ -45,7 +45,7 @@
</dd>
</dl>
</div>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.9.1</h1>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.10.0rc1</h1>
<section id="section-abstract">
<h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2>
<p id="section-abstract-1">
Expand Down Expand Up @@ -367,7 +367,7 @@ <h2 id="name-introduction">
<p id="section-1-5">
The latest version of this documentation is available in HTML form at <span><a href="https://xml2rfc.ietf.org/xml2rfc-doc">https://xml2rfc.ietf.org/xml2rfc-doc</a></span>.<a href="#section-1-5" class="pilcrow"></a></p>
<p id="section-1-6">
This documentation applies to xml2rfc version 3.9.1.<a href="#section-1-6" class="pilcrow"></a></p>
This documentation applies to xml2rfc version 3.10.0rc1.<a href="#section-1-6" class="pilcrow"></a></p>
</section>
<section id="section-2">
<h2 id="name-schema-version-3-elements">
Expand Down Expand Up @@ -6333,7 +6333,7 @@ <h2 id="name-xml2rfc-documentation-templ">
<p id="appendix-D-1">

The following variables are available for use in an xml2rfc
manpage Jinja2 template, as of xml2rfc version 3.9.1:<a href="#appendix-D-1" class="pilcrow"></a></p>
manpage Jinja2 template, as of xml2rfc version 3.10.0rc1:<a href="#appendix-D-1" class="pilcrow"></a></p>
<span class="break"></span><dl class="dlNewline" id="appendix-D-2">
<dt id="appendix-D-2.1">{{ bare_latin_tags }}:</dt>
<dd style="margin-left: 1.5em" id="appendix-D-2.2"></dd>
Expand Down
12 changes: 6 additions & 6 deletions tests/valid/docfile.py38.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
<meta charset="utf-8">
<meta content="Cherokee,Common,Greek,Latin" name="scripts">
<meta content="initial-scale=1.0" name="viewport">
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.9.1</title>
<title>Xml2rfc Vocabulary Version 3 Schema xml2rfc release 3.10.0rc1</title>
<meta content="xml2rfc(1)" name="author">
<meta content="
This document provides information about the XML schema implemented in this release of xml2rfc, and the individual elements of that schema. The document is generated from the RNG schema file that is part of the xml2rfc distribution, so schema information in this document should always be in sync with the schema in actual use. The textual descriptions depend on manual updates in order to reflect the implementation.
" name="description">
<meta content="xml2rfc 3.9.1" name="generator">
<meta content="xml2rfc-docs-3.9.1" name="ietf.draft">
<meta content="xml2rfc 3.10.0rc1" name="generator">
<meta content="xml2rfc-docs-3.10.0rc1" name="ietf.draft">
<link href="tests/out/docfile.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
<link href="xml2rfc.css" rel="stylesheet">
Expand Down Expand Up @@ -45,7 +45,7 @@
</dd>
</dl>
</div>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.9.1</h1>
<h1 id="title">Xml2rfc Vocabulary Version 3 Schema<br>xml2rfc release 3.10.0rc1</h1>
<section id="section-abstract">
<h2 id="abstract"><a href="#abstract" class="selfRef">Abstract</a></h2>
<p id="section-abstract-1">
Expand Down Expand Up @@ -367,7 +367,7 @@ <h2 id="name-introduction">
<p id="section-1-5">
The latest version of this documentation is available in HTML form at <span><a href="https://xml2rfc.ietf.org/xml2rfc-doc">https://xml2rfc.ietf.org/xml2rfc-doc</a></span>.<a href="#section-1-5" class="pilcrow"></a></p>
<p id="section-1-6">
This documentation applies to xml2rfc version 3.9.1.<a href="#section-1-6" class="pilcrow"></a></p>
This documentation applies to xml2rfc version 3.10.0rc1.<a href="#section-1-6" class="pilcrow"></a></p>
</section>
<section id="section-2">
<h2 id="name-schema-version-3-elements">
Expand Down Expand Up @@ -6333,7 +6333,7 @@ <h2 id="name-xml2rfc-documentation-templ">
<p id="appendix-D-1">

The following variables are available for use in an xml2rfc
manpage Jinja2 template, as of xml2rfc version 3.9.1:<a href="#appendix-D-1" class="pilcrow"></a></p>
manpage Jinja2 template, as of xml2rfc version 3.10.0rc1:<a href="#appendix-D-1" class="pilcrow"></a></p>
<span class="break"></span><dl class="dlNewline" id="appendix-D-2">
<dt id="appendix-D-2.1">{{ bare_latin_tags }}:</dt>
<dd style="margin-left: 1.5em" id="appendix-D-2.2"></dd>
Expand Down
12 changes: 6 additions & 6 deletions tests/valid/indexes.pages.text
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@


Network Working Group H. Person, Ed.
Internet-Draft August 12, 2021
Internet-Draft August 31, 2021
Intended status: Experimental
Expires: February 13, 2022
Expires: March 4, 2022


xml2rfc index tests
Expand All @@ -26,7 +26,7 @@ Status of This Memo
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."

This Internet-Draft will expire on February 13, 2022.
This Internet-Draft will expire on March 4, 2022.

Copyright Notice

Expand All @@ -53,7 +53,7 @@ Table of Contents



Person Expires February 13, 2022 [Page 1]
Person Expires March 4, 2022 [Page 1]

Internet-Draft xml2rfc index tests August 2021

Expand Down Expand Up @@ -109,7 +109,7 @@ Index



Person Expires February 13, 2022 [Page 2]
Person Expires March 4, 2022 [Page 2]

Internet-Draft xml2rfc index tests August 2021

Expand Down Expand Up @@ -165,4 +165,4 @@ Author's Address



Person Expires February 13, 2022 [Page 3]
Person Expires March 4, 2022 [Page 3]
8 changes: 4 additions & 4 deletions tests/valid/indexes.prepped.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='utf-8'?>
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="exp" docName="indexes-00" indexInclude="true" ipr="trust200902" prepTime="2021-08-12T17:57:05" scripts="Common,Latin" sortRefs="true" submissionType="independent" symRefs="true" tocDepth="3" tocInclude="true">
<!-- xml2rfc v2v3 conversion 3.9.1 -->
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" version="3" category="exp" docName="indexes-00" indexInclude="true" ipr="trust200902" prepTime="2021-08-31T00:14:08" scripts="Common,Latin" sortRefs="true" submissionType="independent" symRefs="true" tocDepth="3" tocInclude="true">
<!-- xml2rfc v2v3 conversion 3.10.0rc1 -->



Expand All @@ -20,7 +20,7 @@
</postal>
</address>
</author>
<date day="12" month="08" year="2021"/>
<date day="31" month="08" year="2021"/>
<boilerplate>
<section anchor="status-of-memo" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.1">
<name slugifiedName="name-status-of-this-memo">Status of This Memo</name>
Expand All @@ -41,7 +41,7 @@
material or to cite them other than as "work in progress."
</t>
<t indent="0" pn="section-boilerplate.1-4">
This Internet-Draft will expire on 13 February 2022.
This Internet-Draft will expire on 4 March 2022.
</t>
</section>
<section anchor="copyright" numbered="false" removeInRFC="false" toc="exclude" pn="section-boilerplate.2">
Expand Down
6 changes: 3 additions & 3 deletions tests/valid/indexes.text
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@


Network Working Group H. Person, Ed.
Internet-Draft August 12, 2021
Internet-Draft August 31, 2021
Intended status: Experimental
Expires: February 13, 2022
Expires: March 4, 2022


xml2rfc index tests
Expand All @@ -26,7 +26,7 @@ Status of This Memo
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."

This Internet-Draft will expire on February 13, 2022.
This Internet-Draft will expire on March 4, 2022.

Copyright Notice

Expand Down
10 changes: 5 additions & 5 deletions tests/valid/indexes.v3.py36.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta content="initial-scale=1.0" name="viewport">
<title>xml2rfc index tests</title>
<meta content="Human Person" name="author">
<meta content="xml2rfc 3.9.1" name="generator">
<meta content="xml2rfc 3.10.0rc1" name="generator">
<meta content="indexes-00" name="ietf.draft">
<link href="tests/input/indexes.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
Expand All @@ -23,7 +23,7 @@
</tr></thead>
<tfoot><tr>
<td class="left">Person</td>
<td class="center">Expires February 13, 2022</td>
<td class="center">Expires March 4, 2022</td>
<td class="right">[Page]</td>
</tr></tfoot>
</table>
Expand All @@ -36,12 +36,12 @@
<dd class="internet-draft">indexes-00</dd>
<dt class="label-published">Published:</dt>
<dd class="published">
<time datetime="2021-08-12" class="published">August 12, 2021</time>
<time datetime="2021-08-31" class="published">August 31, 2021</time>
</dd>
<dt class="label-intended-status">Intended Status:</dt>
<dd class="intended-status">Experimental</dd>
<dt class="label-expires">Expires:</dt>
<dd class="expires"><time datetime="2022-02-13">February 13, 2022</time></dd>
<dd class="expires"><time datetime="2022-03-04">March 4, 2022</time></dd>
<dt class="label-authors">Author:</dt>
<dd class="authors">
<div class="author">
Expand Down Expand Up @@ -71,7 +71,7 @@ <h2 id="name-status-of-this-memo">
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."<a href="#section-boilerplate.1-3" class="pilcrow"></a></p>
<p id="section-boilerplate.1-4">
This Internet-Draft will expire on February 13, 2022.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
This Internet-Draft will expire on March 4, 2022.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
</section>
</div>
<div id="copyright">
Expand Down
10 changes: 5 additions & 5 deletions tests/valid/indexes.v3.py37.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta content="initial-scale=1.0" name="viewport">
<title>xml2rfc index tests</title>
<meta content="Human Person" name="author">
<meta content="xml2rfc 3.9.1" name="generator">
<meta content="xml2rfc 3.10.0rc1" name="generator">
<meta content="indexes-00" name="ietf.draft">
<link href="tests/input/indexes.xml" rel="alternate" type="application/rfc+xml">
<link href="#copyright" rel="license">
Expand All @@ -23,7 +23,7 @@
</tr></thead>
<tfoot><tr>
<td class="left">Person</td>
<td class="center">Expires February 13, 2022</td>
<td class="center">Expires March 4, 2022</td>
<td class="right">[Page]</td>
</tr></tfoot>
</table>
Expand All @@ -36,12 +36,12 @@
<dd class="internet-draft">indexes-00</dd>
<dt class="label-published">Published:</dt>
<dd class="published">
<time datetime="2021-08-12" class="published">August 12, 2021</time>
<time datetime="2021-08-31" class="published">August 31, 2021</time>
</dd>
<dt class="label-intended-status">Intended Status:</dt>
<dd class="intended-status">Experimental</dd>
<dt class="label-expires">Expires:</dt>
<dd class="expires"><time datetime="2022-02-13">February 13, 2022</time></dd>
<dd class="expires"><time datetime="2022-03-04">March 4, 2022</time></dd>
<dt class="label-authors">Author:</dt>
<dd class="authors">
<div class="author">
Expand Down Expand Up @@ -71,7 +71,7 @@ <h2 id="name-status-of-this-memo">
time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress."<a href="#section-boilerplate.1-3" class="pilcrow"></a></p>
<p id="section-boilerplate.1-4">
This Internet-Draft will expire on February 13, 2022.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
This Internet-Draft will expire on March 4, 2022.<a href="#section-boilerplate.1-4" class="pilcrow"></a></p>
</section>
</div>
<div id="copyright">
Expand Down
Loading

0 comments on commit 9e59346

Please sign in to comment.