r2025 - jhalfs/trunk

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Wed Sep 28 12:30:33 PDT 2005


Author: manuel
Date: 2005-09-28 13:30:31 -0600 (Wed, 28 Sep 2005)
New Revision: 2025

Modified:
   jhalfs/trunk/dump-commands.xsl
   jhalfs/trunk/jhalfs
Log:
Added support to run the optional testsuites.

Modified: jhalfs/trunk/dump-commands.xsl
===================================================================
--- jhalfs/trunk/dump-commands.xsl	2005-09-28 17:18:06 UTC (rev 2024)
+++ jhalfs/trunk/dump-commands.xsl	2005-09-28 19:30:31 UTC (rev 2025)
@@ -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&#xA;&#xA;</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> &&&#xA;</xsl:text>
+    </xsl:if>
+  </xsl:template>
+
+  <xsl:template match="userinput" mode="screen">
     <xsl:apply-templates/>
   </xsl:template>
 

Modified: jhalfs/trunk/jhalfs
===================================================================
--- jhalfs/trunk/jhalfs	2005-09-28 17:18:06 UTC (rev 2024)
+++ jhalfs/trunk/jhalfs	2005-09-28 19:30:31 UTC (rev 2025)
@@ -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 @@
                                 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 @@
       shift
       ;;
 
+    --no-testsuites | -T )
+      shift
+      TEST=1
+      shift
+      ;;
+
     * )
       echo "$usage"
       exit 1
@@ -110,6 +117,7 @@
 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 @@
   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




More information about the alfs-log mailing list