Author: pierre
Date: Fri Jan 12 01:40:59 2018
New Revision: 4022
Log:
Really comment out test instructions+always define TESTLOG since the user
may "uncomment" some tests
Modified:
jhalfs/trunk/LFS/lfs.xsl
jhalfs/trunk/LFS/master.sh
Modified: jhalfs/trunk/LFS/lfs.xsl
==============================================================================
--- jhalfs/trunk/LFS/lfs.xsl Sun Jan 7 13:22:46 2018 (r4021)
+++ jhalfs/trunk/LFS/lfs.xsl Fri Jan 12 01:40:59 2018 (r4022)
@@ -412,86 +412,9 @@
</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 -->
@@ -957,5 +880,73 @@
</xsl:otherwise>
</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>
Modified: jhalfs/trunk/LFS/master.sh
==============================================================================
--- jhalfs/trunk/LFS/master.sh Sun Jan 7 13:22:46 2018 (r4021)
+++ jhalfs/trunk/LFS/master.sh Fri Jan 12 01:40:59 2018 (r4022)
@@ -125,8 +125,9 @@
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 @@
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" ]] &&
- CHROOT_wrt_test_log "${this_script}" "$pkg_version"
- ;;
- * )
- [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] &&
- CHROOT_wrt_test_log "${this_script}" "$pkg_version"
- ;;
- esac
+ # Always initialize the log file, so that the use may reinstate a
+ # commented out test
+ CHROOT_wrt_test_log "${this_script}" "$pkg_version"
# If using optimizations, write the instructions
[[ "$OPTIMIZE" != "0" ]] && wrt_optimize "$name" && wrt_makeflags
"$name"
fi
--
http://lists.linuxfromscratch.org/listinfo/alfs-log
Unsubscribe: See the above information page