r2086 - jhalfs/trunk

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Fri Oct 7 12:13:21 PDT 2005


Author: manuel
Date: 2005-10-07 13:13:20 -0600 (Fri, 07 Oct 2005)
New Revision: 2086

Modified:
   jhalfs/trunk/dump-lfs-scripts.xsl
   jhalfs/trunk/jhalfs
Log:
Added switch to skip toolchain test suites if desired.
That switch will disable also the build of TCL, Expect and DejaGNU.

Modified: jhalfs/trunk/dump-lfs-scripts.xsl
===================================================================
--- jhalfs/trunk/dump-lfs-scripts.xsl	2005-10-07 18:17:20 UTC (rev 2085)
+++ jhalfs/trunk/dump-lfs-scripts.xsl	2005-10-07 19:13:20 UTC (rev 2086)
@@ -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,9 +96,26 @@
                 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>&#xA;</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> &&&#xA;</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
       <xsl:when test="contains(string(),'EOF')">
         <xsl:variable name="content">
           <xsl:apply-templates/>
@@ -104,17 +125,17 @@
         <xsl:value-of select="substring-after(string($content), '"EOF"')"/>
         <xsl:text>&#xA;) ></xsl:text>
         <xsl:value-of select="substring-after((substring-before(string($content), '<<')), 'cat >')"/>
+        <xsl:text> &&&#xA;</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>&#xA;</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>&#xA;</xsl:text>
   </xsl:template>
 
   <xsl:template match="replaceable">

Modified: jhalfs/trunk/jhalfs
===================================================================
--- jhalfs/trunk/jhalfs	2005-10-07 18:17:20 UTC (rev 2085)
+++ jhalfs/trunk/jhalfs	2005-10-07 19:13:20 UTC (rev 2086)
@@ -34,12 +34,16 @@
 
   -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 @@
       shift
       ;;
 
+    --no-toolchain-test )
+      TOOLCHAINTEST=0
+      shift
+      ;;
+
     * )
       echo "$usage"
       exit 1
@@ -161,6 +170,7 @@
 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 @@
   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 @@
     # 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"




More information about the alfs-log mailing list