Really comment out test instructions+always define TESTLOG since the user
may "uncomment" some tests
This commit is contained in:
parent
489bdc21d1
commit
5a8939e7f9
2 changed files with 77 additions and 93 deletions
151
LFS/lfs.xsl
151
LFS/lfs.xsl
|
@ -412,86 +412,9 @@ exit
|
|||
</xsl:when>
|
||||
<!-- test instructions -->
|
||||
<xsl:when test="@remap = 'test'">
|
||||
<xsl:if test="$testsuite = '0' or
|
||||
$testsuite = '1' and
|
||||
not(ancestor::sect1[@id='ch-system-gcc']) and
|
||||
not(ancestor::sect1[@id='ch-system-glibc']) and
|
||||
not(ancestor::sect1[@id='ch-system-gmp']) and
|
||||
not(ancestor::sect1[@id='ch-system-mpfr']) and
|
||||
not(ancestor::sect1[@id='ch-system-binutils']) or
|
||||
$testsuite = '2' and
|
||||
ancestor::chapter[@id='chapter-temporary-tools']">
|
||||
<xsl:text># </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$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>&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 glibc -->
|
||||
<xsl:when test="contains(string(), 'glibc-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> <!-- end not bomb-test=n -->
|
||||
</xsl:choose>
|
||||
<xsl:call-template name="comment-test">
|
||||
<xsl:with-param name="instructions" select="string()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<!-- End of test instructions -->
|
||||
<!-- Don't stop on strip run -->
|
||||
|
@ -958,4 +881,72 @@ DNS=</xsl:text>
|
|||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="comment-test">
|
||||
<xsl:param name="instructions" select="''"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($instructions,'
')">
|
||||
<xsl:call-template name="comment-test">
|
||||
<xsl:with-param name="instructions"
|
||||
select="substring-before($instructions,'
')"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="comment-test">
|
||||
<xsl:with-param name="instructions"
|
||||
select="substring-after($instructions,'
')"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:if test="$testsuite = '0' or
|
||||
$testsuite = '1' and
|
||||
not(ancestor::sect1[@id='ch-system-gcc']) and
|
||||
not(ancestor::sect1[@id='ch-system-glibc']) and
|
||||
not(ancestor::sect1[@id='ch-system-gmp']) and
|
||||
not(ancestor::sect1[@id='ch-system-mpfr']) and
|
||||
not(ancestor::sect1[@id='ch-system-binutils']) or
|
||||
$testsuite = '2' and
|
||||
ancestor::chapter[@id='chapter-temporary-tools']">
|
||||
<xsl:text># </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$bomb-testsuite = 'n'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains(string(), 'make -k')">
|
||||
<xsl:value-of select="$instructions"/>
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains($instructions, 'make')">
|
||||
<xsl:value-of select="substring-before($instructions, 'make')"/>
|
||||
<xsl:text>make -k</xsl:text>
|
||||
<xsl:value-of select="substring-after($instructions, 'make')"/>
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$instructions"/>
|
||||
<xsl:if test="not(contains($instructions, '>>'))">
|
||||
<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>
|
||||
<xsl:when test="contains($instructions, 'make -k')">
|
||||
<xsl:value-of select="$instructions"/>
|
||||
<xsl:text> >> $TEST_LOG 2>&1 || true
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$instructions"/>
|
||||
<xsl:if test="not(contains($instructions, '>>'))">
|
||||
<xsl:text> >> $TEST_LOG 2>&1</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:otherwise> <!-- end not bomb-test=n -->
|
||||
</xsl:choose>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
|
|
|
@ -125,8 +125,9 @@ chapter5_Makefiles() {
|
|||
if [ "$pkg_tarball" != "" ] ; then
|
||||
# Insert instructions for unpacking the package and to set the PKGDIR variable.
|
||||
LUSER_wrt_unpack "$pkg_tarball"
|
||||
# If the testsuites must be run, initialize the log file
|
||||
[[ "$TEST" = "3" ]] && LUSER_wrt_test_log "${this_script}" "$pkg_version"
|
||||
# Always initialize the log file, since the test instructions may be
|
||||
# "uncommented" by the user
|
||||
LUSER_wrt_test_log "${this_script}" "$pkg_version"
|
||||
# If using optimizations, write the instructions
|
||||
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||
fi
|
||||
|
@ -249,17 +250,9 @@ chapter6_Makefiles() {
|
|||
CHROOT_wrt_TouchTimestamp
|
||||
fi
|
||||
CHROOT_Unpack "$pkg_tarball"
|
||||
# If the testsuites must be run, initialize the log file
|
||||
case $name in
|
||||
binutils | gcc | glibc | gmp | mpfr )
|
||||
[[ "$TEST" != "0" ]] &&
|
||||
# Always initialize the log file, so that the use may reinstate a
|
||||
# commented out test
|
||||
CHROOT_wrt_test_log "${this_script}" "$pkg_version"
|
||||
;;
|
||||
* )
|
||||
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] &&
|
||||
CHROOT_wrt_test_log "${this_script}" "$pkg_version"
|
||||
;;
|
||||
esac
|
||||
# If using optimizations, write the instructions
|
||||
[[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
|
||||
fi
|
||||
|
|
Reference in a new issue