Index: CLFS/clfs.xsl
===================================================================
--- CLFS/clfs.xsl	(revision 4fe29a2cf5d6b31a960ed0b26482a4254d7dbdb0)
+++ CLFS/clfs.xsl	(revision e35e794b5071039aa76d9e9abc544e965903c683)
@@ -31,5 +31,5 @@
 
   <!-- Time zone -->
-  <xsl:param name="timezone" select="America/Toronto"/>
+  <xsl:param name="timezone" select="GMT"/>
 
   <!-- Page size -->
@@ -37,5 +37,5 @@
 
   <!-- Locale settings -->
-  <xsl:param name="lang" select="en_CA"/>
+  <xsl:param name="lang" select="C"/>
 
   <xsl:template match="/">
@@ -121,5 +121,5 @@
       <xsl:text>make -k</xsl:text>
       <xsl:value-of select="substring-after(string(),'make')"/>
-      <xsl:text> || true&#xA;</xsl:text>
+      <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
     </xsl:if>
   </xsl:template>
@@ -166,9 +166,19 @@
       <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> &gt;&gt; $TEST_LOG 2&gt;&amp;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
@@ -176,5 +186,5 @@
         <xsl:choose>
           <xsl:when test="$testsuite != '0'">
-            <xsl:text>make -k check || true&#xA;</xsl:text>
+            <xsl:text>make -k check &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
@@ -183,8 +193,6 @@
         <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(),'&gt;g')"/>
+            <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
@@ -195,4 +203,7 @@
           <xsl:when test="$testsuite != '0'">
             <xsl:apply-templates/>
+            <xsl:if test="contains(string(),'test_summary')">
+              <xsl:text> &gt;&gt; $TEST_LOG</xsl:text>
+            </xsl:if>
             <xsl:text>&#xA;</xsl:text>
           </xsl:when>
Index: CLFS/master.sh
===================================================================
--- CLFS/master.sh	(revision 4fe29a2cf5d6b31a960ed0b26482a4254d7dbdb0)
+++ CLFS/master.sh	(revision e35e794b5071039aa76d9e9abc544e965903c683)
@@ -543,4 +543,14 @@
       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
@@ -646,4 +656,14 @@
       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
Index: HLFS/hlfs.xsl
===================================================================
--- HLFS/hlfs.xsl	(revision 4fe29a2cf5d6b31a960ed0b26482a4254d7dbdb0)
+++ HLFS/hlfs.xsl	(revision e35e794b5071039aa76d9e9abc544e965903c683)
@@ -31,5 +31,5 @@
 
   <!-- Time zone -->
-  <xsl:param name="timezone" select="America/Toronto"/>
+  <xsl:param name="timezone" select="GMT"/>
 
   <!-- Page size -->
@@ -37,6 +37,6 @@
 
   <!-- 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="/">
@@ -145,5 +145,5 @@
       <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 &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
         </xsl:when>
         <xsl:otherwise>
@@ -151,5 +151,5 @@
           <xsl:text>make -k</xsl:text>
           <xsl:value-of select="substring-after(string(),'make')"/>
-          <xsl:text> || true&#xA;</xsl:text>
+          <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
         </xsl:otherwise>
       </xsl:choose>
@@ -212,10 +212,20 @@
       </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> &gt;&gt; $TEST_LOG 2&gt;&amp;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
@@ -225,6 +235,5 @@
                     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 &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
@@ -235,5 +244,5 @@
           <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 &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
Index: HLFS/master.sh
===================================================================
--- HLFS/master.sh	(revision 4fe29a2cf5d6b31a960ed0b26482a4254d7dbdb0)
+++ HLFS/master.sh	(revision e35e794b5071039aa76d9e9abc544e965903c683)
@@ -144,8 +144,11 @@
       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
@@ -315,4 +318,14 @@
       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
Index: LFS/lfs.xsl
===================================================================
--- LFS/lfs.xsl	(revision 4fe29a2cf5d6b31a960ed0b26482a4254d7dbdb0)
+++ LFS/lfs.xsl	(revision e35e794b5071039aa76d9e9abc544e965903c683)
@@ -25,5 +25,5 @@
 
   <!-- Time zone -->
-  <xsl:param name="timezone" select="America/Toronto"/>
+  <xsl:param name="timezone" select="GMT"/>
 
   <!-- Page size -->
@@ -31,5 +31,5 @@
 
   <!-- Locale settings -->
-  <xsl:param name="lang" select="en_CA"/>
+  <xsl:param name="lang" select="C"/>
 
   <xsl:template match="/">
@@ -113,5 +113,5 @@
       <xsl:text>make -k</xsl:text>
       <xsl:value-of select="substring-after(string(),'make')"/>
-      <xsl:text> || true&#xA;</xsl:text>
+      <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
     </xsl:if>
   </xsl:template>
@@ -148,9 +148,19 @@
       </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> &gt;&gt; $TEST_LOG 2&gt;&amp;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
@@ -160,6 +170,5 @@
                     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 &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
@@ -168,8 +177,6 @@
         <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&gt;&amp;1')"/>
+            <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
           </xsl:when>
         </xsl:choose>
@@ -182,4 +189,7 @@
                     $testsuite = '3'">
             <xsl:apply-templates/>
+            <xsl:if test="contains(string(),'test_summary')">
+              <xsl:text> &gt;&gt; $TEST_LOG</xsl:text>
+            </xsl:if>
             <xsl:text>&#xA;</xsl:text>
           </xsl:when>
Index: LFS/master.sh
===================================================================
--- LFS/master.sh	(revision 4fe29a2cf5d6b31a960ed0b26482a4254d7dbdb0)
+++ LFS/master.sh	(revision e35e794b5071039aa76d9e9abc544e965903c683)
@@ -113,4 +113,7 @@
       # 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
@@ -217,4 +220,14 @@
       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
Index: common/common-functions
===================================================================
--- common/common-functions	(revision 4fe29a2cf5d6b31a960ed0b26482a4254d7dbdb0)
+++ common/common-functions	(revision e35e794b5071039aa76d9e9abc544e965903c683)
@@ -277,5 +277,5 @@
 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
@@ -298,4 +298,28 @@
 	@ROOT=\`head -n1 \$(SRC)/\$(PKG_LST) | sed 's@^./@@;s@/.*@@'\` && \\
 	echo "export PKGDIR=\$(SRC)/\$\$ROOT" > envars
+EOF
+) >> $MKFILE.tmp
+}
+
+#----------------------------------#
+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
Index: common/config
===================================================================
--- common/config	(revision 4fe29a2cf5d6b31a960ed0b26482a4254d7dbdb0)
+++ common/config	(revision e35e794b5071039aa76d9e9abc544e965903c683)
@@ -90,6 +90,7 @@
 #--- 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)
Index: master.sh
===================================================================
--- master.sh	(revision 4fe29a2cf5d6b31a960ed0b26482a4254d7dbdb0)
+++ master.sh	(revision e35e794b5071039aa76d9e9abc544e965903c683)
@@ -139,4 +139,5 @@
           JHALFSDIR=$BUILDDIR/${SCRIPT_ROOT}
           LOGDIR=$JHALFSDIR/logs
+          TESTLOGDIR=$JHALFSDIR/test-logs
           MKFILE=$JHALFSDIR/Makefile
           ;;
@@ -416,6 +417,6 @@
 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_}"
 
@@ -480,8 +481,11 @@
 >$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
