Update clfs script generation to new book layout (remap="test" attribute).
Thanks to William Harrington for the patch
This commit is contained in:
parent
5f6a6b496f
commit
c3b96a9e55
2 changed files with 90 additions and 31 deletions
117
CLFS/clfs.xsl
117
CLFS/clfs.xsl
|
@ -184,41 +184,100 @@
|
|||
</xsl:when>
|
||||
<!-- No interactive commands are needed if the .config file is the proper one -->
|
||||
<xsl:when test="contains(string(),'menuconfig')"/>
|
||||
<!-- The Coreutils and Module-Init-Tools test suites are optional -->
|
||||
<xsl:when test="(ancestor::sect1[@id='ch-system-coreutils'] or
|
||||
ancestor::sect1[@id='ch-system-module-init-tools']) and
|
||||
(contains(string(),'check') or
|
||||
contains(string(),'dummy'))">
|
||||
<!-- test instructions -->
|
||||
<xsl:when test="@remap = 'test'">
|
||||
<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:if test="not(contains(string(),'check'))">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:if test="contains(string(),'check')">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$bomb-testsuite = 'n'">
|
||||
<xsl:value-of select="substring-before(string(),'check')"/>
|
||||
<xsl:text>-k check</xsl:text>
|
||||
<xsl:value-of select="substring-after(string(),'check')"/>
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text> >> $TEST_LOG 2>&1</xsl:text>
|
||||
<xsl:if test="contains(string(),' -k ')">
|
||||
<xsl:text> || true</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$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>&1')"/>
|
||||
<xsl:text>>> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
<!-- special case for procps-ng -->
|
||||
<xsl:when test="contains(string(), 'pushd')">
|
||||
<xsl:text>{ </xsl:text>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text>; } >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(string(), 'make -k')">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true
</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> >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:if test="not(contains(string(), '>>'))">
|
||||
<xsl:text> >> $TEST_LOG 2>&1</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</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>&1')"/>
|
||||
<xsl:text>>> $TEST_LOG 2>&1 || true
</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>>> $TEST_LOG 2>&1 && exit $PIPESTATUS)
</xsl:text>
|
||||
</xsl:when>
|
||||
<!-- special case for procps-ng -->
|
||||
<xsl:when test="contains(string(), 'pushd')">
|
||||
<xsl:text>{ </xsl:text>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text>; } >> $TEST_LOG 2>&1
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(string(), 'make -k')">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:if test="not(contains(string(), '>>'))">
|
||||
<xsl:text> >> $TEST_LOG 2>&1</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<!-- End of test instructions -->
|
||||
|
||||
<!-- 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:when test="$testsuite != '0'">
|
||||
<xsl:value-of select="substring-before(string(),'2>')"/>
|
||||
|
|
|
@ -777,8 +777,8 @@ menu "--- Build Settings"
|
|||
depends CONFIG_TESTS
|
||||
default TST_1
|
||||
|
||||
config TST_1
|
||||
bool "Only final system Glibc, GMP, MPFR, GCC and Binutils testsuites"
|
||||
config TST_1
|
||||
bool "Only final critical testsuites" if !BOOK_CLFS2 && !BOOK_CLFS3
|
||||
|
||||
config TST_2
|
||||
bool "All final system testsuites"
|
||||
|
|
Reference in a new issue