Added support to run the optional testsuites.
This commit is contained in:
parent
b8bf2f858a
commit
db9cec66f1
2 changed files with 23 additions and 6 deletions
|
@ -6,6 +6,8 @@
|
|||
|
||||
<!-- XSLT stylesheet to create shell scripts from LFS books. -->
|
||||
|
||||
<xsl:param name="testsuite" select="0"/>
|
||||
|
||||
<xsl:template match="/">
|
||||
<xsl:apply-templates select="//sect1"/>
|
||||
</xsl:template>
|
||||
|
@ -42,7 +44,7 @@
|
|||
<!-- Creating dirs and files -->
|
||||
<exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
|
||||
<xsl:text>#!/bin/sh

</xsl:text>
|
||||
<xsl:apply-templates select=".//screen"/>
|
||||
<xsl:apply-templates select=".//para/userinput | .//screen"/>
|
||||
</exsl:document>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
@ -52,7 +54,7 @@
|
|||
<xsl:choose>
|
||||
<xsl:when test="@role = 'nodump'"/>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="userinput"/>
|
||||
<xsl:apply-templates select="userinput" mode="screen"/>
|
||||
<xsl:if test="position() != last() and
|
||||
not(contains(string(),'EOF'))">
|
||||
<xsl:text> &&</xsl:text>
|
||||
|
@ -63,7 +65,14 @@
|
|||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="userinput">
|
||||
<xsl:template match="para/userinput">
|
||||
<xsl:if test="$testsuite = '0'">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text> &&
</xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="userinput" mode="screen">
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
|
14
jhalfs
14
jhalfs
|
@ -3,7 +3,7 @@
|
|||
version="
|
||||
jhalfs development
|
||||
|
||||
Written by Jeremy Huntwork.
|
||||
Originally written by Jeremy Huntwork.
|
||||
Maintained by Manuel Canales Esparcia.
|
||||
|
||||
This program is published under the \
|
||||
|
@ -22,6 +22,7 @@ Options:
|
|||
DIR/jhalfs
|
||||
-D, --download-client=CLIENT use CLIENT as the program for retrieving
|
||||
packages
|
||||
-T, --no-testsuites don't run the package's testsuites.
|
||||
"
|
||||
|
||||
help="\
|
||||
|
@ -77,6 +78,12 @@ while test $# -gt 0 ; do
|
|||
shift
|
||||
;;
|
||||
|
||||
--no-testsuites | -T )
|
||||
shift
|
||||
TEST=1
|
||||
shift
|
||||
;;
|
||||
|
||||
* )
|
||||
echo "$usage"
|
||||
exit 1
|
||||
|
@ -110,6 +117,7 @@ JHALFSDIR=$BUILDDIR/jhalfs
|
|||
LOG=build.log
|
||||
MKFILE=$JHALFSDIR/Makefile
|
||||
XSL=dump-commands.xsl
|
||||
if [ -z $TEST ] ; then TEST=0 ; fi
|
||||
|
||||
get_book() {
|
||||
# Check for Subversion instead of just letting the script hit 'svn' and fail.
|
||||
|
@ -156,8 +164,8 @@ extract_commands() {
|
|||
echo -n "Extracting commands... "
|
||||
|
||||
# Dump the commands in shell script form from the LFS book.
|
||||
xsltproc --nonet --xinclude -o ./commands/ $XSL \
|
||||
lfs-$LFSVRS/index.xml >>$JHALFSDIR/$LOG 2>&1
|
||||
xsltproc --nonet --xinclude --stringparam testsuite $TEST -o ./commands/ \
|
||||
$XSL lfs-$LFSVRS/index.xml >>$JHALFSDIR/$LOG 2>&1
|
||||
|
||||
# Grab the patches and package names.
|
||||
cd $JHALFSDIR
|
||||
|
|
Reference in a new issue