r2752 - in jhalfs/branches/experimental: . CLFS HLFS LFS common

manuel at linuxfromscratch.org manuel at linuxfromscratch.org
Sun Jun 4 10:59:03 PDT 2006


Author: manuel
Date: 2006-06-04 11:59:02 -0600 (Sun, 04 Jun 2006)
New Revision: 2752

Modified:
   jhalfs/branches/experimental/CLFS/clfs.xsl
   jhalfs/branches/experimental/CLFS/master.sh
   jhalfs/branches/experimental/HLFS/hlfs.xsl
   jhalfs/branches/experimental/HLFS/master.sh
   jhalfs/branches/experimental/LFS/lfs.xsl
   jhalfs/branches/experimental/LFS/master.sh
   jhalfs/branches/experimental/common/common-functions
   jhalfs/branches/experimental/common/config
   jhalfs/branches/experimental/master.sh
Log:
Merged r2750 from trunk.

Modified: jhalfs/branches/experimental/CLFS/clfs.xsl
===================================================================
--- jhalfs/branches/experimental/CLFS/clfs.xsl	2006-06-04 17:56:01 UTC (rev 2751)
+++ jhalfs/branches/experimental/CLFS/clfs.xsl	2006-06-04 17:59:02 UTC (rev 2752)
@@ -30,13 +30,13 @@
   <xsl:param name="vim-lang" select="1"/>
 
   <!-- Time zone -->
-  <xsl:param name="timezone" select="America/Toronto"/>
+  <xsl:param name="timezone" select="GMT"/>
 
   <!-- Page size -->
   <xsl:param name="page" select="letter"/>
 
   <!-- Locale settings -->
-  <xsl:param name="lang" select="en_CA"/>
+  <xsl:param name="lang" select="C"/>
 
   <xsl:template match="/">
     <xsl:apply-templates select="//sect1"/>
@@ -120,7 +120,7 @@
       <xsl:value-of select="substring-before(string(),'make')"/>
       <xsl:text>make -k</xsl:text>
       <xsl:value-of select="substring-after(string(),'make')"/>
-      <xsl:text> || true&#xA;</xsl:text>
+      <xsl:text> >> $TEST_LOG 2>&1 || true&#xA;</xsl:text>
     </xsl:if>
   </xsl:template>
 
@@ -165,27 +165,35 @@
       <!-- No interactive commands are needed if the .config file is the proper one -->
       <xsl:when test="contains(string(),'menuconfig')"/>
       <!-- The Coreutils and Module-Init-Tools test suites are optional -->
-      <xsl:when test="($testsuite = '0' or $testsuite = '1') and
-                (ancestor::sect1[@id='ch-system-coreutils'] or
+      <xsl:when test="(ancestor::sect1[@id='ch-system-coreutils'] or
                 ancestor::sect1[@id='ch-system-module-init-tools']) and
                 (contains(string(),'check') or
-                contains(string(),'dummy'))"/>
+                contains(string(),'dummy'))">
+        <xsl:choose>
+          <xsl:when test="$testsuite = '0' or $testsuite = '1'"/>
+          <xsl:otherwise>
+            <xsl:apply-templates/>
+            <xsl:if test="contains(string(),'check')">
+              <xsl:text> >> $TEST_LOG 2>&1 || true</xsl:text>
+            </xsl:if>
+            <xsl:text>&#xA;</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
       <!-- Fixing toolchain test suites run -->
       <xsl:when test="string() = 'make check' or
                 string() = 'make -k check'">
         <xsl:choose>
           <xsl:when test="$testsuite != '0'">
-            <xsl:text>make -k check || true&#xA;</xsl:text>
+            <xsl:text>make -k check >> $TEST_LOG 2>&1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
       </xsl:when>
       <xsl:when test="contains(string(),'glibc-check-log')">
         <xsl:choose>
           <xsl:when test="$testsuite != '0'">
-            <xsl:value-of select="substring-before(string(),';')"/>
-            <xsl:text> || true&#xA;</xsl:text>
-            <xsl:value-of select="substring-after(string(),';')"/>
-            <xsl:text>&#xA;</xsl:text>
+            <xsl:value-of select="substring-before(string(),'>g')"/>
+            <xsl:text>>> $TEST_LOG 2>&1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
       </xsl:when>
@@ -194,6 +202,9 @@
         <xsl:choose>
           <xsl:when test="$testsuite != '0'">
             <xsl:apply-templates/>
+            <xsl:if test="contains(string(),'test_summary')">
+              <xsl:text> >> $TEST_LOG</xsl:text>
+            </xsl:if>
             <xsl:text>&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>

Modified: jhalfs/branches/experimental/CLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/CLFS/master.sh	2006-06-04 17:56:01 UTC (rev 2751)
+++ jhalfs/branches/experimental/CLFS/master.sh	2006-06-04 17:59:02 UTC (rev 2752)
@@ -542,6 +542,16 @@
     if [ "$vrs" != "" ] ; then
       FILE="$name-$vrs.tar.*"
       wrt_unpack2 "$FILE"
+      # If the testsuites must be run, initialize the log file
+      case $name in
+        binutils | gcc | glibc )
+          [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
+          ;;
+        * )
+          [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && wrt_test_log2 "${this_script}"
+          ;;
+      esac
+      # If using optimizations, write the instructions
       [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
     #
@@ -645,6 +655,16 @@
     if [ "$vrs" != "" ] ; then
       FILE="$name-$vrs.tar.*"
       wrt_unpack3 "$FILE"
+      # If the testsuites must be run, initialize the log file
+      case $name in
+        binutils | gcc | glibc )
+          [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
+          ;;
+        * )
+          [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && wrt_test_log2 "${this_script}"
+          ;;
+      esac
+      # If using optimizations, write the instructions
       [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
     #

Modified: jhalfs/branches/experimental/HLFS/hlfs.xsl
===================================================================
--- jhalfs/branches/experimental/HLFS/hlfs.xsl	2006-06-04 17:56:01 UTC (rev 2751)
+++ jhalfs/branches/experimental/HLFS/hlfs.xsl	2006-06-04 17:59:02 UTC (rev 2752)
@@ -30,14 +30,14 @@
   <xsl:param name="testsuite" select="1"/>
 
   <!-- Time zone -->
-  <xsl:param name="timezone" select="America/Toronto"/>
+  <xsl:param name="timezone" select="GMT"/>
 
   <!-- Page size -->
   <xsl:param name="page" select="letter"/>
 
   <!-- Locale settings -->
-  <xsl:param name="lang" select="en_CA"/>
-  <xsl:param name="lc_all" select="en_CA"/>
+  <xsl:param name="lang" select="C"/>
+  <xsl:param name="lc_all" select="C"/>
 
   <xsl:template match="/">
     <xsl:apply-templates select="//sect1"/>
@@ -144,13 +144,13 @@
             $testsuite = '3')">
       <xsl:choose>
         <xsl:when test="ancestor::sect1[@id='ch-system-gcc']">
-          <xsl:text>make -k check || true&#xA;</xsl:text>
+          <xsl:text>make -k check >> $TEST_LOG 2>&1 || true&#xA;</xsl:text>
         </xsl:when>
         <xsl:otherwise>
           <xsl:value-of select="substring-before(string(),'make')"/>
           <xsl:text>make -k</xsl:text>
           <xsl:value-of select="substring-after(string(),'make')"/>
-          <xsl:text> || true&#xA;</xsl:text>
+          <xsl:text> >> $TEST_LOG 2>&1 || true&#xA;</xsl:text>
         </xsl:otherwise>
       </xsl:choose>
     </xsl:if>
@@ -211,12 +211,22 @@
         <xsl:text>&#xA;</xsl:text>
       </xsl:when>
       <!-- The Coreutils and Module-Init-Tools test suites are optional -->
-      <xsl:when test="($testsuite = '0' or $testsuite = '1') and
-                (ancestor::sect1[@id='ch-system-coreutils'] or
+      <xsl:when test="(ancestor::sect1[@id='ch-system-coreutils'] or
                 ancestor::sect1[@id='ch-system-module-init-tools']) and
                 (contains(string(),'check') or
                 contains(string(),'distclean') or
-                contains(string(),'dummy'))"/>
+                contains(string(),'dummy'))">
+        <xsl:choose>
+          <xsl:when test="$testsuite = '0' or $testsuite = '1'"/>
+          <xsl:otherwise>
+            <xsl:apply-templates/>
+            <xsl:if test="contains(string(),'check')">
+              <xsl:text> >> $TEST_LOG 2>&1 || true</xsl:text>
+            </xsl:if>
+            <xsl:text>&#xA;</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
       <!-- Fixing toolchain test suites run -->
       <xsl:when test="string() = 'make check' or
                 string() = 'make -k check'">
@@ -224,8 +234,7 @@
           <xsl:when test="(($testsuite = '1' or $testsuite = '2') and
                     ancestor::chapter[@id='chapter-building-system']) or
                     $testsuite = '3'">
-            <xsl:text>make -k check || true</xsl:text>
-            <xsl:text>&#xA;</xsl:text>
+            <xsl:text>make -k check >> $TEST_LOG 2>&1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
       </xsl:when>
@@ -234,7 +243,7 @@
         <xsl:choose>
           <xsl:when test="$testsuite != '0'">
             <xsl:value-of select="substring-before(string(),'make check')"/>
-            <xsl:text>make -k check || true&#xA;</xsl:text>
+            <xsl:text>make -k check >> $TEST_LOG 2>&1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
       </xsl:when>

Modified: jhalfs/branches/experimental/HLFS/master.sh
===================================================================
--- jhalfs/branches/experimental/HLFS/master.sh	2006-06-04 17:56:01 UTC (rev 2751)
+++ jhalfs/branches/experimental/HLFS/master.sh	2006-06-04 17:59:02 UTC (rev 2752)
@@ -143,10 +143,13 @@
       # Insert instructions for unpacking the package and to set the PKGDIR variable.
       case $this_script in
         *binutils* )
-	  wrt_unpack "$FILE" 1 ;; # Do not delete an existing package directories
-	*)
-	  wrt_unpack "$FILE" ;;
+          wrt_unpack "$FILE" 1 ;; # Do not delete an existing package directories
+        *)
+          wrt_unpack "$FILE" ;;
       esac
+      # If the testsuites must be run, initialize the log file
+      [[ "$TEST" = "3" ]] && wrt_test_log "${this_script}"
+      # If using optimizations, write the instructions
       [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
 
@@ -314,6 +317,16 @@
       esac
       wrt_unpack2 "$FILE"
       wrt_target_vars
+      # If the testsuites must be run, initialize the log file
+      case $name in
+        binutils | gcc | glibc )
+          [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
+          ;;
+        * )
+          [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && wrt_test_log2 "${this_script}"
+          ;;
+      esac
+      # If using optimizations, write the instructions
       [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
 

Modified: jhalfs/branches/experimental/LFS/lfs.xsl
===================================================================
--- jhalfs/branches/experimental/LFS/lfs.xsl	2006-06-04 17:56:01 UTC (rev 2751)
+++ jhalfs/branches/experimental/LFS/lfs.xsl	2006-06-04 17:59:02 UTC (rev 2752)
@@ -24,13 +24,13 @@
   <xsl:param name="vim-lang" select="1"/>
 
   <!-- Time zone -->
-  <xsl:param name="timezone" select="America/Toronto"/>
+  <xsl:param name="timezone" select="GMT"/>
 
   <!-- Page size -->
   <xsl:param name="page" select="letter"/>
 
   <!-- Locale settings -->
-  <xsl:param name="lang" select="en_CA"/>
+  <xsl:param name="lang" select="C"/>
 
   <xsl:template match="/">
     <xsl:apply-templates select="//sect1"/>
@@ -112,7 +112,7 @@
       <xsl:value-of select="substring-before(string(),'make')"/>
       <xsl:text>make -k</xsl:text>
       <xsl:value-of select="substring-after(string(),'make')"/>
-      <xsl:text> || true&#xA;</xsl:text>
+      <xsl:text> >> $TEST_LOG 2>&1 || true&#xA;</xsl:text>
     </xsl:if>
   </xsl:template>
 
@@ -147,11 +147,21 @@
         <xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text>
       </xsl:when>
       <!-- The Coreutils and Module-Init-Tools test suites are optional -->
-      <xsl:when test="($testsuite = '0' or $testsuite = '1') and
-                (ancestor::sect1[@id='ch-system-coreutils'] or
+      <xsl:when test="(ancestor::sect1[@id='ch-system-coreutils'] or
                 ancestor::sect1[@id='ch-system-module-init-tools']) and
                 (contains(string(),'check') or
-                contains(string(),'dummy'))"/>
+                contains(string(),'dummy'))">
+        <xsl:choose>
+          <xsl:when test="$testsuite = '0' or $testsuite = '1'"/>
+          <xsl:otherwise>
+            <xsl:apply-templates/>
+            <xsl:if test="contains(string(),'check')">
+              <xsl:text> >> $TEST_LOG 2>&1 || true</xsl:text>
+            </xsl:if>
+            <xsl:text>&#xA;</xsl:text>
+          </xsl:otherwise>
+        </xsl:choose>
+      </xsl:when>
       <!-- Fixing toolchain test suites run -->
       <xsl:when test="string() = 'make check' or
                 string() = 'make -k check'">
@@ -159,18 +169,15 @@
           <xsl:when test="(($testsuite = '1' or $testsuite = '2') and
                     ancestor::chapter[@id='chapter-building-system']) or
                     $testsuite = '3'">
-            <xsl:text>make -k check || true</xsl:text>
-            <xsl:text>&#xA;</xsl:text>
+            <xsl:text>make -k check >> $TEST_LOG 2>&1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
       </xsl:when>
       <xsl:when test="contains(string(),'glibc-check-log')">
         <xsl:choose>
           <xsl:when test="$testsuite != '0'">
-            <xsl:value-of select="substring-before(string(),'&#xA;')"/>
-            <xsl:text> || true&#xA;</xsl:text>
-            <xsl:value-of select="substring-after(string(),'&#xA;')"/>
-            <xsl:text>&#xA;</xsl:text>
+            <xsl:value-of select="substring-before(string(),'2>&1')"/>
+            <xsl:text>>> $TEST_LOG 2>&1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
       </xsl:when>
@@ -181,6 +188,9 @@
                     ancestor::chapter[@id='chapter-building-system']) or
                     $testsuite = '3'">
             <xsl:apply-templates/>
+            <xsl:if test="contains(string(),'test_summary')">
+              <xsl:text> >> $TEST_LOG</xsl:text>
+            </xsl:if>
             <xsl:text>&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>

Modified: jhalfs/branches/experimental/LFS/master.sh
===================================================================
--- jhalfs/branches/experimental/LFS/master.sh	2006-06-04 17:56:01 UTC (rev 2751)
+++ jhalfs/branches/experimental/LFS/master.sh	2006-06-04 17:59:02 UTC (rev 2752)
@@ -112,6 +112,9 @@
 
       # Insert instructions for unpacking the package and to set the PKGDIR variable.
       wrt_unpack "$FILE"
+      # If the testsuites must be run, initialize the log file
+      [[ "$TEST" = "3" ]] && wrt_test_log "${this_script}"
+      # If using optimizations, write the instructions
       [[ "$OPTIMIZE" = "2" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
 
@@ -216,6 +219,16 @@
     if [ "$vrs" != "" ] ; then
       FILE="$name-$vrs.tar.*"
       wrt_unpack2 "$FILE"
+      # If the testsuites must be run, initialize the log file
+      case $name in
+        binutils | gcc | glibc )
+          [[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
+          ;;
+        * )
+          [[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && wrt_test_log2 "${this_script}"
+          ;;
+      esac
+      # If using optimizations, write the instructions
       [[ "$OPTIMIZE" != "0" ]] &&  wrt_optimize "$name" && wrt_makeflags "$name"
     fi
 

Modified: jhalfs/branches/experimental/common/common-functions
===================================================================
--- jhalfs/branches/experimental/common/common-functions	2006-06-04 17:56:01 UTC (rev 2751)
+++ jhalfs/branches/experimental/common/common-functions	2006-06-04 17:59:02 UTC (rev 2752)
@@ -276,7 +276,7 @@
 (
 cat  << EOF
 	@\$(call unpack2,$FILE)
-	@ROOT=\`head -n1 \$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
+	@ROOT=\`head -n1 \$(MOUNT_PT)\$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
 	echo "export PKGDIR=\$(SRC)/\$\$ROOT" > envars
 EOF
 ) >> $MKFILE.tmp
@@ -302,6 +302,30 @@
 }
 
 #----------------------------------#
+wrt_test_log() {                   # Initialize testsuite log file
+#----------------------------------#
+  local TESTLOGFILE=$1
+(
+cat  << EOF
+	@echo "export TEST_LOG=$TESTLOGDIR/$TESTLOGFILE" >> envars && \\
+	su - lfs -c "echo -e '\n\`date\`\n' >$TESTLOGDIR/$TESTLOGFILE"
+EOF
+) >> $MKFILE.tmp
+}
+
+#----------------------------------#
+wrt_test_log2() {                  #
+#----------------------------------#
+  local TESTLOGFILE=$1
+(
+cat  << EOF
+	@echo "export TEST_LOG=/$SCRIPT_ROOT/test-logs/$TESTLOGFILE" >> envars && \\
+	echo -e "\n\`date\`\n" >test-logs/$TESTLOGFILE
+EOF
+) >> $MKFILE.tmp
+}
+
+#----------------------------------#
 wrt_target_vars() {                # Target vars for hlfs (cross-build method)
 #----------------------------------#
 (

Modified: jhalfs/branches/experimental/common/config
===================================================================
--- jhalfs/branches/experimental/common/config	2006-06-04 17:56:01 UTC (rev 2751)
+++ jhalfs/branches/experimental/common/config	2006-06-04 17:59:02 UTC (rev 2752)
@@ -89,8 +89,9 @@
 
 #--- Working directories
 SCRIPT_ROOT=jhalfs
-JHALFSDIR=$BUILDDIR/$SCRIPT_ROOT
-   LOGDIR=$JHALFSDIR/logs
+  JHALFSDIR=$BUILDDIR/$SCRIPT_ROOT
+     LOGDIR=$JHALFSDIR/logs
+ TESTLOGDIR=$JHALFSDIR/test-logs
 
 #--- File listing package contents (from where package sources dir is extracted)
 PKG_LST=unpacked

Modified: jhalfs/branches/experimental/master.sh
===================================================================
--- jhalfs/branches/experimental/master.sh	2006-06-04 17:56:01 UTC (rev 2751)
+++ jhalfs/branches/experimental/master.sh	2006-06-04 17:59:02 UTC (rev 2752)
@@ -138,6 +138,7 @@
           BUILDDIR=$1
           JHALFSDIR=$BUILDDIR/${SCRIPT_ROOT}
           LOGDIR=$JHALFSDIR/logs
+          TESTLOGDIR=$JHALFSDIR/test-logs
           MKFILE=$JHALFSDIR/Makefile
           ;;
       esac
@@ -415,8 +416,8 @@
 check_version "2.6.2" "`uname -r`"         "KERNEL"
 check_version "3.0"   "$BASH_VERSION"      "BASH"
 check_version "3.0"   "`gcc -dumpversion`" "GCC"
-tarVer=`tar --version`
-check_version "1.15.0" "${tarVer##* }"      "TAR"
+tarVer=`tar --version | head -n1 | cut -d " " -f4`
+check_version "1.15.0" "${tarVer}"      "TAR"
 echo "${SD_BORDER}${nl_}"
 
 validate_config
@@ -479,10 +480,13 @@
 fi
 >$LOGDIR/$LOG
 #
+[[ "$TEST" != "0" ]] && [[ ! -d $TESTLOGDIR ]] && install -d -m 1777 $TESTLOGDIR
 #
 if [[ "$PWD" != "$JHALFSDIR" ]]; then
   cp $COMMON_DIR/{makefile-functions,progress_bar.sh} $JHALFSDIR/
+  #
   [[ "$OPTIMIZE" != "0" ]] && cp optimize/opt_override $JHALFSDIR/
+  #
   if [[ "$COMPARE" != "0" ]] ; then
     mkdir -p $JHALFSDIR/extras
     cp extras/* $JHALFSDIR/extras




More information about the alfs-log mailing list