Added switch to skip toolchain test suites if desired.
That switch will disable also the build of TCL, Expect and DejaGNU.
This commit is contained in:
parent
79f7cf901c
commit
01e51a1d9b
2 changed files with 54 additions and 11 deletions
|
@ -6,8 +6,12 @@
|
|||
|
||||
<!-- XSLT stylesheet to create shell scripts from LFS books. -->
|
||||
|
||||
<!-- Run optional test suites? -->
|
||||
<xsl:param name="testsuite" select="0"/>
|
||||
|
||||
<!-- Run toolchain test suites? -->
|
||||
<xsl:param name="toolchaintest" select="1"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="//sect1"/>
|
||||
</xsl:template>
|
||||
|
@ -92,8 +96,25 @@
|
|||
ancestor::sect1[@id='ch-system-coreutils'] and
|
||||
(contains(string(),'check') or
|
||||
contains(string(),'dummy'))"/>
|
||||
<xsl:when test="string() = 'make check'">
|
||||
<xsl:text>make -k check</xsl:text>
|
||||
<xsl:when test="string() = 'make check' or
|
||||
string() = 'make -k check'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$toolchaintest = '0'"/>
|
||||
<xsl:otherwise>
|
||||
<xsl:text>make -k check</xsl:text>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(string(),'glibc-check-log') or
|
||||
contains(string(),'test_summary')">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$toolchaintest = '0'"/>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text> &&
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(string(),'EOF')">
|
||||
<xsl:variable name="content">
|
||||
|
@ -104,17 +125,17 @@
|
|||
<xsl:value-of select="substring-after(string($content), '"EOF"')"/>
|
||||
<xsl:text>
) ></xsl:text>
|
||||
<xsl:value-of select="substring-after((substring-before(string($content), '<<')), 'cat >')"/>
|
||||
<xsl:text> &&
</xsl:text>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates/>
|
||||
<xsl:if test="not(contains(string(),'check')) and
|
||||
not(contains(string(),'strip '))">
|
||||
<xsl:text> &&</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="not(contains(string(),'check')) and
|
||||
not(contains(string(),'strip ')) and
|
||||
not(contains(string(),'dummy'))">
|
||||
<xsl:text> &&</xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="replaceable">
|
||||
|
|
28
jhalfs
28
jhalfs
|
@ -34,12 +34,16 @@ Options:
|
|||
|
||||
-T, --testsuites add support to run the optional testsuites
|
||||
|
||||
--no-toolchain-test don't run the toolchain testsuites. This
|
||||
disables also the build of TCL, Expect
|
||||
and DejaGNU
|
||||
|
||||
-M, --run-make run make on the generated Makefile
|
||||
|
||||
--page_size PAGE set PAGE as the default page size (letter,
|
||||
A4, or others). This setting is required to
|
||||
build Groff. If no speciffied, \"letter\"
|
||||
will be used.
|
||||
will be used
|
||||
"
|
||||
|
||||
help="\
|
||||
|
@ -125,6 +129,11 @@ while test $# -gt 0 ; do
|
|||
shift
|
||||
;;
|
||||
|
||||
--no-toolchain-test )
|
||||
TOOLCHAINTEST=0
|
||||
shift
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "$usage"
|
||||
exit 1
|
||||
|
@ -161,6 +170,7 @@ MKFILE=$JHALFSDIR/Makefile
|
|||
XSL=dump-lfs-scripts.xsl
|
||||
FNC=functions
|
||||
if [ -z $TEST ] ; then TEST=0 ; fi
|
||||
if [ -z $TOOLCHAINTEST ] ; then TOOLCHAINTEST=1 ; fi
|
||||
if [ -z $PAGE ] ; then PAGE=letter ; fi
|
||||
|
||||
HEADER="# This file is automatically generated by jhalfs
|
||||
|
@ -222,8 +232,9 @@ extract_commands() {
|
|||
echo -n "Extracting commands... "
|
||||
|
||||
# Dump the commands in shell script form from the LFS book.
|
||||
xsltproc --nonet --xinclude --stringparam testsuite $TEST -o ./commands/ \
|
||||
$XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
|
||||
xsltproc --nonet --xinclude --stringparam testsuite $TEST \
|
||||
--stringparam toolchaintest $TOOLCHAINTEST -o ./commands/ \
|
||||
$XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
|
||||
|
||||
# Make the scripts executables.
|
||||
chmod -R +x $JHALFSDIR/commands
|
||||
|
@ -333,6 +344,17 @@ build_Makefile() {
|
|||
# Keep the script file name
|
||||
i=`basename $file`
|
||||
|
||||
# If no testsuites will be run, then TCL, Expect and DejaGNU isn't needed
|
||||
if [ "$TOOLCHAINTEST" = "0" ]; then
|
||||
if echo $i | grep -q "tcl" ; then
|
||||
continue
|
||||
elif echo $i | grep -q "expect" ; then
|
||||
continue
|
||||
elif echo $i | grep -q "dejagnu" ; then
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# First append each name of the script files to a list (this will become
|
||||
# the names of the targets in the Makefile
|
||||
chapter5="$chapter5 $i"
|
||||
|
|
Reference in a new issue