Changed how the testsuites are handled and fixed the missing locales installation for chapter05 testsuites.

This commit is contained in:
Manuel Canales Esparcia 2006-03-09 22:23:47 +00:00
parent 1b9148c45a
commit 6db1464904

View file

@ -13,11 +13,12 @@
<!-- XSLT stylesheet to create shell scripts from LFS books. --> <!-- XSLT stylesheet to create shell scripts from LFS books. -->
<!-- Run optional test suites? --> <!-- Run test suites?
<xsl:param name="testsuite" select="0"/> 0 = none
1 = only chapter06 Glibc, GCC and Binutils testsuites
<!-- Run toolchain test suites? --> 2 = all chapter06 testsuites
<xsl:param name="toolchaintest" select="1"/> 3 = all chapter05 and chapter06 testsuites-->
<xsl:param name="testsuite" select="1"/>
<!-- Install vim-lang package? --> <!-- Install vim-lang package? -->
<xsl:param name="vim-lang" select="1"/> <xsl:param name="vim-lang" select="1"/>
@ -78,26 +79,27 @@
</xsl:if> </xsl:if>
</xsl:if> </xsl:if>
<xsl:apply-templates select=".//para/userinput | .//screen"/> <xsl:apply-templates select=".//para/userinput | .//screen"/>
<xsl:if test="$testsuite='3' and @id='ch-tools-glibc'">
<xsl:copy-of select="//sect1[@id='ch-system-glibc']/sect2[2]/screen[@role='nodump']"/>
<xsl:text>&#xA;</xsl:text>
</xsl:if>
<xsl:text>exit</xsl:text> <xsl:text>exit</xsl:text>
</exsl:document> </exsl:document>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="screen"> <xsl:template match="screen">
<xsl:if test="child::* = userinput"> <xsl:if test="child::* = userinput and not(@role = 'nodump')">
<xsl:choose> <xsl:apply-templates select="userinput" mode="screen"/>
<xsl:when test="@role = 'nodump'"/>
<xsl:otherwise>
<xsl:apply-templates select="userinput" mode="screen"/>
</xsl:otherwise>
</xsl:choose>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="para/userinput"> <xsl:template match="para/userinput">
<xsl:if test="$testsuite != '0' and <xsl:if test="(contains(string(),'test') or
(contains(string(),'test') or contains(string(),'check')) and
contains(string(),'check'))"> (($testsuite = '2' and
ancestor::chapter[@id='chapter-building-system']) or
$testsuite = '3')">
<xsl:value-of select="substring-before(string(),'make')"/> <xsl:value-of select="substring-before(string(),'make')"/>
<xsl:text>make -k</xsl:text> <xsl:text>make -k</xsl:text>
<xsl:value-of select="substring-after(string(),'make')"/> <xsl:value-of select="substring-after(string(),'make')"/>
@ -127,7 +129,7 @@
<xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text> <xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text>
</xsl:when> </xsl:when>
<!-- The Coreutils and Module-Init-Tools test suites are optional --> <!-- The Coreutils and Module-Init-Tools test suites are optional -->
<xsl:when test="$testsuite = '0' and <xsl:when test="($testsuite = '0' or $testsuite = '1') and
(ancestor::sect1[@id='ch-system-coreutils'] or (ancestor::sect1[@id='ch-system-coreutils'] or
ancestor::sect1[@id='ch-system-module-init-tools']) and ancestor::sect1[@id='ch-system-module-init-tools']) and
(contains(string(),'check') or (contains(string(),'check') or
@ -136,32 +138,33 @@
<xsl:when test="string() = 'make check' or <xsl:when test="string() = 'make check' or
string() = 'make -k check'"> string() = 'make -k check'">
<xsl:choose> <xsl:choose>
<xsl:when test="$toolchaintest = '0'"/> <xsl:when test="(($testsuite = '1' or $testsuite = '2') and
<xsl:otherwise> ancestor::chapter[@id='chapter-building-system']) or
$testsuite = '3'">
<xsl:text>make -k check || true</xsl:text> <xsl:text>make -k check || true</xsl:text>
<xsl:text>&#xA;</xsl:text> <xsl:text>&#xA;</xsl:text>
</xsl:otherwise> </xsl:when>
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
<xsl:when test="contains(string(),'glibc-check-log')"> <xsl:when test="contains(string(),'glibc-check-log')">
<xsl:choose> <xsl:choose>
<xsl:when test="$toolchaintest = '0'"/> <xsl:when test="$testsuite != '0'">
<xsl:otherwise>
<xsl:value-of select="substring-before(string(),'&#xA;')"/> <xsl:value-of select="substring-before(string(),'&#xA;')"/>
<xsl:text> || true&#xA;</xsl:text> <xsl:text> || true&#xA;</xsl:text>
<xsl:value-of select="substring-after(string(),'&#xA;')"/> <xsl:value-of select="substring-after(string(),'&#xA;')"/>
<xsl:text>&#xA;</xsl:text> <xsl:text>&#xA;</xsl:text>
</xsl:otherwise> </xsl:when>
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
<xsl:when test="contains(string(),'test_summary') or <xsl:when test="contains(string(),'test_summary') or
contains(string(),'expect -c')"> contains(string(),'expect -c')">
<xsl:choose> <xsl:choose>
<xsl:when test="$toolchaintest = '0'"/> <xsl:when test="(($testsuite = '1' or $testsuite = '2') and
<xsl:otherwise> ancestor::chapter[@id='chapter-building-system']) or
$testsuite = '3'">
<xsl:apply-templates/> <xsl:apply-templates/>
<xsl:text>&#xA;</xsl:text> <xsl:text>&#xA;</xsl:text>
</xsl:otherwise> </xsl:when>
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
<!-- Don't stop on strip run --> <!-- Don't stop on strip run -->