Update clfs script generation to new book layout (remap="test" attribute).

Thanks to William Harrington for the patch
This commit is contained in:
Pierre Labastie 2014-02-14 20:39:51 +00:00
parent 5f6a6b496f
commit c3b96a9e55
2 changed files with 90 additions and 31 deletions

View file

@ -184,41 +184,100 @@
</xsl:when> </xsl:when>
<!-- No interactive commands are needed if the .config file is the proper one --> <!-- No interactive commands are needed if the .config file is the proper one -->
<xsl:when test="contains(string(),'menuconfig')"/> <xsl:when test="contains(string(),'menuconfig')"/>
<!-- The Coreutils and Module-Init-Tools test suites are optional --> <!-- test instructions -->
<xsl:when test="(ancestor::sect1[@id='ch-system-coreutils'] or <xsl:when test="@remap = 'test'">
ancestor::sect1[@id='ch-system-module-init-tools']) and
(contains(string(),'check') or
contains(string(),'dummy'))">
<xsl:choose> <xsl:choose>
<xsl:when test="$testsuite = '0' or $testsuite = '1'"/> <xsl:when test="$testsuite = '0'"/>
<xsl:when test="$testsuite = '1' and
not(ancestor::sect1[@id='ch-system-gcc']) and
not(ancestor::sect1[@id='ch-system-eglibc']) and
not(ancestor::sect1[@id='ch-system-gmp']) and
not(ancestor::sect1[@id='ch-system-mpfr']) and
not(ancestor::sect1[@id='ch-system-mpc']) and
not(ancestor::sect1[@id='ch-system-ppl']) and
not(ancestor::sect1[@id='ch-system-isl']) and
not(ancestor::sect1[@id='ch-system-cloog']) and
not(ancestor::sect1[@id='ch-system-cloog-ppl']) and
not(ancestor::sect1[@id='ch-system-binutils'])"/>
<xsl:when test="$testsuite = '2' and
ancestor::chapter[@id='ch-temp-system']"/>
<xsl:otherwise> <xsl:otherwise>
<xsl:if test="not(contains(string(),'check'))">
<xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text>
</xsl:if>
<xsl:if test="contains(string(),'check')">
<xsl:choose> <xsl:choose>
<xsl:when test="$bomb-testsuite = 'n'"> <xsl:when test="$bomb-testsuite = 'n'">
<xsl:value-of select="substring-before(string(),'check')"/> <xsl:choose>
<xsl:text>-k check</xsl:text> <!-- special case for eglibc -->
<xsl:value-of select="substring-after(string(),'check')"/> <xsl:when test="contains(string(), 'eglibc-check-log')">
<xsl:value-of
select="substring-before(string(),'2&gt;&amp;1')"/>
<xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<!-- special case for procps-ng -->
<xsl:when test="contains(string(), 'pushd')">
<xsl:text>{ </xsl:text>
<xsl:apply-templates/>
<xsl:text>; } &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:when test="contains(string(), 'make -k')">
<xsl:apply-templates/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:when test="contains(string(), 'make')">
<xsl:value-of select="substring-before(string(),'make')"/>
<xsl:text>make -k</xsl:text>
<xsl:value-of select="substring-after(string(),'make')"/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text> <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:apply-templates/> <xsl:apply-templates/>
<xsl:if test="not(contains(string(), '&gt;&gt;'))">
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text> <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
<xsl:if test="contains(string(),' -k ')">
<xsl:text> || true</xsl:text>
</xsl:if> </xsl:if>
<xsl:text>&#xA;</xsl:text> <xsl:text>&#xA;</xsl:text>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:when>
<xsl:otherwise>
<!-- bomb-testsuite != 'n'-->
<xsl:choose>
<!-- special case for eglibc -->
<xsl:when test="contains(string(), 'eglibc-check-log')">
<xsl:value-of
select="substring-before(string(),'2&gt;&amp;1')"/>
<xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<!-- special case for gmp -->
<xsl:when test="contains(string(), 'tee gmp-check-log')">
<xsl:text>(</xsl:text>
<xsl:apply-templates/>
<xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 &amp;&amp; exit $PIPESTATUS)&#xA;</xsl:text>
</xsl:when>
<!-- special case for procps-ng -->
<xsl:when test="contains(string(), 'pushd')">
<xsl:text>{ </xsl:text>
<xsl:apply-templates/>
<xsl:text>; } &gt;&gt; $TEST_LOG 2&gt;&amp;1&#xA;</xsl:text>
</xsl:when>
<xsl:when test="contains(string(), 'make -k')">
<xsl:apply-templates/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
<xsl:if test="not(contains(string(), '&gt;&gt;'))">
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
</xsl:if> </xsl:if>
<xsl:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
<!-- End of test instructions -->
<!-- Fixing toolchain test suites run XXX more to fix --> <!-- Fixing toolchain test suites run XXX more to fix -->
<xsl:when test="contains(string(),'glibc-check-log')"> <xsl:when test="contains(string(),'eglibc-check-log')">
<xsl:choose> <xsl:choose>
<xsl:when test="$testsuite != '0'"> <xsl:when test="$testsuite != '0'">
<xsl:value-of select="substring-before(string(),'2&gt;')"/> <xsl:value-of select="substring-before(string(),'2&gt;')"/>

View file

@ -778,7 +778,7 @@ menu "--- Build Settings"
default TST_1 default TST_1
config TST_1 config TST_1
bool "Only final system Glibc, GMP, MPFR, GCC and Binutils testsuites" bool "Only final critical testsuites" if !BOOK_CLFS2 && !BOOK_CLFS3
config TST_2 config TST_2
bool "All final system testsuites" bool "All final system testsuites"