Ignore:
Timestamp:
03/10/2006 06:55:30 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
b287536
Parents:
0d52034
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dump-lfs-scripts.xsl

    r0d52034 r31d6944  
    1212<!-- XSLT stylesheet to create shell scripts from LFS books. -->
    1313
    14   <!-- Run optional test suites? -->
    15   <xsl:param name="testsuite" select="0"/>
    16 
    17   <!-- Run toolchain test suites? -->
    18   <xsl:param name="toolchaintest" select="1"/>
     14  <!-- Run test suites?
     15       0 = none
     16       1 = only chapter06 Glibc, GCC and Binutils testsuites
     17       2 = all chapter06 testsuites
     18       3 = all chapter05 and chapter06 testsuites-->
     19  <xsl:param name="testsuite" select="1"/>
    1920
    2021  <!-- Install vim-lang package? -->
     
    7778        </xsl:if>
    7879        <xsl:apply-templates select=".//para/userinput | .//screen"/>
     80        <xsl:if test="$testsuite='3' and @id='ch-tools-glibc'">
     81          <xsl:copy-of select="//sect1[@id='ch-system-glibc']/sect2[2]/screen[@role='nodump']"/>
     82          <xsl:text>&#xA;</xsl:text>
     83        </xsl:if>
    7984        <xsl:text>exit</xsl:text>
    8085      </exsl:document>
     
    8388
    8489  <xsl:template match="screen">
    85     <xsl:if test="child::* = userinput">
    86       <xsl:choose>
    87         <xsl:when test="@role = 'nodump'"/>
    88         <xsl:otherwise>
    89           <xsl:apply-templates select="userinput" mode="screen"/>
    90         </xsl:otherwise>
    91       </xsl:choose>
     90    <xsl:if test="child::* = userinput and not(@role = 'nodump')">
     91      <xsl:apply-templates select="userinput" mode="screen"/>
    9292    </xsl:if>
    9393  </xsl:template>
    9494
    9595  <xsl:template match="para/userinput">
    96     <xsl:if test="$testsuite != '0' and
    97             (contains(string(),'test') or
    98             contains(string(),'check'))">
     96    <xsl:if test="(contains(string(),'test') or
     97            contains(string(),'check')) and
     98            (($testsuite = '2' and
     99            ancestor::chapter[@id='chapter-building-system']) or
     100            $testsuite = '3')">
    99101      <xsl:value-of select="substring-before(string(),'make')"/>
    100102      <xsl:text>make -k</xsl:text>
     
    126128      </xsl:when>
    127129      <!-- The Coreutils and Module-Init-Tools test suites are optional -->
    128       <xsl:when test="$testsuite = '0' and
     130      <xsl:when test="($testsuite = '0' or $testsuite = '1') and
    129131                (ancestor::sect1[@id='ch-system-coreutils'] or
    130132                ancestor::sect1[@id='ch-system-module-init-tools']) and
     
    135137                string() = 'make -k check'">
    136138        <xsl:choose>
    137           <xsl:when test="$toolchaintest = '0'"/>
    138           <xsl:otherwise>
     139          <xsl:when test="(($testsuite = '1' or $testsuite = '2') and
     140                    ancestor::chapter[@id='chapter-building-system']) or
     141                    $testsuite = '3'">
    139142            <xsl:text>make -k check || true</xsl:text>
    140143            <xsl:text>&#xA;</xsl:text>
    141           </xsl:otherwise>
     144          </xsl:when>
    142145        </xsl:choose>
    143146      </xsl:when>
    144147      <xsl:when test="contains(string(),'glibc-check-log')">
    145148        <xsl:choose>
    146           <xsl:when test="$toolchaintest = '0'"/>
    147           <xsl:otherwise>
     149          <xsl:when test="$testsuite != '0'">
    148150            <xsl:value-of select="substring-before(string(),'&#xA;')"/>
    149151            <xsl:text> || true&#xA;</xsl:text>
    150152            <xsl:value-of select="substring-after(string(),'&#xA;')"/>
    151153            <xsl:text>&#xA;</xsl:text>
    152           </xsl:otherwise>
     154          </xsl:when>
    153155        </xsl:choose>
    154156      </xsl:when>
     
    156158                contains(string(),'expect -c')">
    157159        <xsl:choose>
    158           <xsl:when test="$toolchaintest = '0'"/>
    159           <xsl:otherwise>
     160          <xsl:when test="(($testsuite = '1' or $testsuite = '2') and
     161                    ancestor::chapter[@id='chapter-building-system']) or
     162                    $testsuite = '3'">
    160163            <xsl:apply-templates/>
    161164            <xsl:text>&#xA;</xsl:text>
    162           </xsl:otherwise>
     165          </xsl:when>
    163166        </xsl:choose>
    164167      </xsl:when>
Note: See TracChangeset for help on using the changeset viewer.