Always generate test instructions, and comment unwanted ones out.

Fixes ticket #1695
This commit is contained in:
Pierre Labastie 2018-01-07 20:20:12 +00:00
parent 4b2a5fd304
commit 1d5f3e309f
2 changed files with 87 additions and 82 deletions

View file

@ -799,21 +799,23 @@ depends !BOOK_BLFS
default y default y
help help
#-- Run test suites #-- Run test suites
# # If you select 'y' here:
# You will have to select between: # You will have to select between:
#
# - Only critical final system testsuites # - Only critical final system testsuites
# - All final system testsuites # - All final system testsuites
# - Both temporary tools and final system testsuites # - Both temporary tools and final system testsuites
#
# HLFS and CLFS have no testsuites available in the
# temporary tools phase
# You will be prompted also about the "flavour" of the # You will be prompted also about the "flavour" of the
# testsuites run: # testsuites run:
#
# - Don't stop on test suite failures # - Don't stop on test suite failures
# - Abort the build at the first test suite failure # - Abort the build at the first test suite failure
# #
# Note that in any case, all the test instructions will
# be generated. Those which are not wanted will be commented
# out. If you select 'n' here, the commented test instructions
# do not stop on test suite failures.
#
# HLFS and CLFS have no testsuites available in the
# temporary tools phase
menu "Test settings" menu "Test settings"
depends CONFIG_TESTS depends CONFIG_TESTS
@ -826,17 +828,22 @@ depends !BOOK_BLFS
help help
#-- Critical tests: #-- Critical tests:
# Only Glibc, Binutils, GMP, MPFR, MPC and GCC # Only Glibc, Binutils, GMP, MPFR, MPC and GCC
# testsuites for final system # testsuites for final system. The others are commented
# out.
config TST_2 config TST_2
bool "All final system testsuites" bool "All final system testsuites"
help
#-- All final system test suites:
# Test instructions for the temporary tools (if available)
# are commented out.
config TST_3 config TST_3
bool "All testsuites" if !BOOK_HLFS && !BOOK_CLFS bool "All testsuites" if !BOOK_HLFS && !BOOK_CLFS
help help
#-- All tests: #-- All tests:
# Runs all the testsuites for both temporary tools # Runs all the testsuites for both temporary tools (if
# and final system # available) and final system
endchoice endchoice
choice choice

View file

@ -411,88 +411,86 @@ exit
</xsl:if> </xsl:if>
</xsl:when> </xsl:when>
<!-- test instructions --> <!-- test instructions -->
<xsl:when test="@remap = 'test'"> <xsl:when test="@remap = 'test'">
<xsl:choose> <xsl:if test="$testsuite = '0' or
<xsl:when test="$testsuite = '0'"/> $testsuite = '1' and
<xsl:when test="$testsuite = '1' and
not(ancestor::sect1[@id='ch-system-gcc']) and not(ancestor::sect1[@id='ch-system-gcc']) and
not(ancestor::sect1[@id='ch-system-glibc']) and not(ancestor::sect1[@id='ch-system-glibc']) and
not(ancestor::sect1[@id='ch-system-gmp']) and not(ancestor::sect1[@id='ch-system-gmp']) and
not(ancestor::sect1[@id='ch-system-mpfr']) and not(ancestor::sect1[@id='ch-system-mpfr']) and
not(ancestor::sect1[@id='ch-system-binutils'])"/> not(ancestor::sect1[@id='ch-system-binutils']) or
<xsl:when test="$testsuite = '2' and $testsuite = '2' and
ancestor::chapter[@id='chapter-temporary-tools']"/> ancestor::chapter[@id='chapter-temporary-tools']">
<xsl:otherwise> <xsl:text># </xsl:text>
</xsl:if>
<xsl:choose>
<xsl:when test="$bomb-testsuite = 'n'">
<xsl:choose> <xsl:choose>
<xsl:when test="$bomb-testsuite = 'n'"> <!-- special case for glibc -->
<xsl:choose> <xsl:when test="contains(string(), 'glibc-check-log')">
<!-- special case for glibc --> <xsl:value-of
<xsl:when test="contains(string(), 'glibc-check-log')"> select="substring-before(string(),'2&gt;&amp;1')"/>
<xsl:value-of <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
select="substring-before(string(),'2&gt;&amp;1')"/> </xsl:when>
<xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text> <!-- special case for procps-ng -->
</xsl:when> <xsl:when test="contains(string(), 'pushd')">
<!-- special case for procps-ng --> <xsl:text>{ </xsl:text>
<xsl:when test="contains(string(), 'pushd')"> <xsl:apply-templates/>
<xsl:text>{ </xsl:text> <xsl:text>; } &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
<xsl:apply-templates/> </xsl:when>
<xsl:text>; } &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text> <xsl:when test="contains(string(), 'make -k')">
</xsl:when> <xsl:apply-templates/>
<xsl:when test="contains(string(), 'make -k')"> <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
<xsl:apply-templates/> </xsl:when>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text> <xsl:when test="contains(string(), 'make')">
</xsl:when> <xsl:value-of select="substring-before(string(),'make')"/>
<xsl:when test="contains(string(), 'make')"> <xsl:text>make -k</xsl:text>
<xsl:value-of select="substring-before(string(),'make')"/> <xsl:value-of select="substring-after(string(),'make')"/>
<xsl:text>make -k</xsl:text> <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</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: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:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<!-- bomb-testsuite != 'n'--> <xsl:apply-templates/>
<xsl:choose> <xsl:if test="not(contains(string(), '&gt;&gt;'))">
<!-- special case for glibc --> <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
<xsl:when test="contains(string(), 'glibc-check-log')"> </xsl:if>
<xsl:value-of <xsl:text>&#xA;</xsl:text>
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:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:otherwise> </xsl:when>
<xsl:otherwise>
<!-- bomb-testsuite != 'n'-->
<xsl:choose>
<!-- special case for glibc -->
<xsl:when test="contains(string(), 'glibc-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:text>&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise> <!-- end not bomb-test=n -->
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
<!-- End of test instructions --> <!-- End of test instructions -->