Changed how the testsuites are handled and fixed the missing locales installation for chapter05 testsuites.
This commit is contained in:
parent
0d52034976
commit
31d6944909
4 changed files with 71 additions and 58 deletions
8
TODO
8
TODO
|
@ -18,7 +18,7 @@ CODE STYLE
|
||||||
"Date" key when needed (like in the -v output of jhalfs)
|
"Date" key when needed (like in the -v output of jhalfs)
|
||||||
|
|
||||||
|
|
||||||
MASTER SCRIPT (work in progress on the experimental branch)
|
MASTER SCRIPT
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
- Make jhalfs a "master script" that will control and run each
|
- Make jhalfs a "master script" that will control and run each
|
||||||
|
@ -45,12 +45,6 @@ LFS MODULE (some of this is applicable also to CLFS and HLFS modules)
|
||||||
|
|
||||||
- To move the LFS module to their own subdir.
|
- To move the LFS module to their own subdir.
|
||||||
|
|
||||||
- To fix the now missing locales installation needed by testsuites
|
|
||||||
in Chapter05 Glibc.
|
|
||||||
|
|
||||||
- Chapter05 testsuites should be optionals. Run by default Chapter06
|
|
||||||
testsuites only.
|
|
||||||
|
|
||||||
- Fix the unpack code to don't hang when both the bz2 and gz formats
|
- Fix the unpack code to don't hang when both the bz2 and gz formats
|
||||||
of the same package are founds in the sources dir.
|
of the same package are founds in the sources dir.
|
||||||
|
|
||||||
|
|
|
@ -11,11 +11,12 @@
|
||||||
|
|
||||||
<!-- XSLT stylesheet to create shell scripts from LFS books. -->
|
<!-- XSLT stylesheet to create shell scripts from LFS books. -->
|
||||||
|
|
||||||
<!-- Run optional test suites? -->
|
<!-- Run test suites?
|
||||||
<xsl:param name="testsuite" select="0"/>
|
0 = none
|
||||||
|
1 = only chapter06 Glibc, GCC and Binutils testsuites
|
||||||
<!-- Run toolchain test suites? -->
|
2 = all chapter06 testsuites
|
||||||
<xsl:param name="toolchaintest" select="1"/>
|
3 = all chapter05 and chapter06 testsuites-->
|
||||||
|
<xsl:param name="testsuite" select="1"/>
|
||||||
|
|
||||||
<!-- Install vim-lang package? -->
|
<!-- Install vim-lang package? -->
|
||||||
<xsl:param name="vim-lang" select="1"/>
|
<xsl:param name="vim-lang" select="1"/>
|
||||||
|
@ -76,26 +77,27 @@
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates select=".//para/userinput | .//screen"/>
|
<xsl:apply-templates select=".//para/userinput | .//screen"/>
|
||||||
|
<xsl:if test="$testsuite='3' and @id='ch-tools-glibc'">
|
||||||
|
<xsl:copy-of select="//sect1[@id='ch-system-glibc']/sect2[2]/screen[@role='nodump']"/>
|
||||||
|
<xsl:text>
</xsl:text>
|
||||||
|
</xsl:if>
|
||||||
<xsl:text>exit</xsl:text>
|
<xsl:text>exit</xsl:text>
|
||||||
</exsl:document>
|
</exsl:document>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="screen">
|
<xsl:template match="screen">
|
||||||
<xsl:if test="child::* = userinput">
|
<xsl:if test="child::* = userinput and not(@role = 'nodump')">
|
||||||
<xsl:choose>
|
<xsl:apply-templates select="userinput" mode="screen"/>
|
||||||
<xsl:when test="@role = 'nodump'"/>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:apply-templates select="userinput" mode="screen"/>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="para/userinput">
|
<xsl:template match="para/userinput">
|
||||||
<xsl:if test="$testsuite != '0' and
|
<xsl:if test="(contains(string(),'test') or
|
||||||
(contains(string(),'test') or
|
contains(string(),'check')) and
|
||||||
contains(string(),'check'))">
|
(($testsuite = '2' and
|
||||||
|
ancestor::chapter[@id='chapter-building-system']) or
|
||||||
|
$testsuite = '3')">
|
||||||
<xsl:value-of select="substring-before(string(),'make')"/>
|
<xsl:value-of select="substring-before(string(),'make')"/>
|
||||||
<xsl:text>make -k</xsl:text>
|
<xsl:text>make -k</xsl:text>
|
||||||
<xsl:value-of select="substring-after(string(),'make')"/>
|
<xsl:value-of select="substring-after(string(),'make')"/>
|
||||||
|
@ -125,7 +127,7 @@
|
||||||
<xsl:text>cp -v ../kernel-config .config
</xsl:text>
|
<xsl:text>cp -v ../kernel-config .config
</xsl:text>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<!-- The Coreutils and Module-Init-Tools test suites are optional -->
|
<!-- The Coreutils and Module-Init-Tools test suites are optional -->
|
||||||
<xsl:when test="$testsuite = '0' and
|
<xsl:when test="($testsuite = '0' or $testsuite = '1') and
|
||||||
(ancestor::sect1[@id='ch-system-coreutils'] or
|
(ancestor::sect1[@id='ch-system-coreutils'] or
|
||||||
ancestor::sect1[@id='ch-system-module-init-tools']) and
|
ancestor::sect1[@id='ch-system-module-init-tools']) and
|
||||||
(contains(string(),'check') or
|
(contains(string(),'check') or
|
||||||
|
@ -134,32 +136,33 @@
|
||||||
<xsl:when test="string() = 'make check' or
|
<xsl:when test="string() = 'make check' or
|
||||||
string() = 'make -k check'">
|
string() = 'make -k check'">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$toolchaintest = '0'"/>
|
<xsl:when test="(($testsuite = '1' or $testsuite = '2') and
|
||||||
<xsl:otherwise>
|
ancestor::chapter[@id='chapter-building-system']) or
|
||||||
|
$testsuite = '3'">
|
||||||
<xsl:text>make -k check || true</xsl:text>
|
<xsl:text>make -k check || true</xsl:text>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
</xsl:otherwise>
|
</xsl:when>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="contains(string(),'glibc-check-log')">
|
<xsl:when test="contains(string(),'glibc-check-log')">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$toolchaintest = '0'"/>
|
<xsl:when test="$testsuite != '0'">
|
||||||
<xsl:otherwise>
|
|
||||||
<xsl:value-of select="substring-before(string(),'
')"/>
|
<xsl:value-of select="substring-before(string(),'
')"/>
|
||||||
<xsl:text> || true
</xsl:text>
|
<xsl:text> || true
</xsl:text>
|
||||||
<xsl:value-of select="substring-after(string(),'
')"/>
|
<xsl:value-of select="substring-after(string(),'
')"/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
</xsl:otherwise>
|
</xsl:when>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="contains(string(),'test_summary') or
|
<xsl:when test="contains(string(),'test_summary') or
|
||||||
contains(string(),'expect -c')">
|
contains(string(),'expect -c')">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$toolchaintest = '0'"/>
|
<xsl:when test="(($testsuite = '1' or $testsuite = '2') and
|
||||||
<xsl:otherwise>
|
ancestor::chapter[@id='chapter-building-system']) or
|
||||||
|
$testsuite = '3'">
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
<xsl:text>
</xsl:text>
|
<xsl:text>
</xsl:text>
|
||||||
</xsl:otherwise>
|
</xsl:when>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<!-- Don't stop on strip run -->
|
<!-- Don't stop on strip run -->
|
||||||
|
|
57
jhalfs
57
jhalfs
|
@ -53,11 +53,16 @@ Options:
|
||||||
|
|
||||||
For stable 6.1.1 book, please use jhalfs-0.2.
|
For stable 6.1.1 book, please use jhalfs-0.2.
|
||||||
|
|
||||||
-T, --testsuites add support to run the optional testsuites
|
-T, --testsuites LEVEL add support to run the optional testsuites.
|
||||||
|
Available LEVEL values are:
|
||||||
|
|
||||||
--no-toolchain-test don't run the toolchain testsuites. This
|
0 No testsuites run. This also disables the
|
||||||
also disables the build of TCL, Expect
|
build of TCL, Expect and DejaGNU
|
||||||
and DejaGNU
|
1 Run only final system Glic, GCC, and Binutils
|
||||||
|
testsuites. Used as default
|
||||||
|
2 Run all final system testsuites
|
||||||
|
3 Run all testsuites for both temporal and final
|
||||||
|
systems
|
||||||
|
|
||||||
--no-strip don't run the strip command on both the
|
--no-strip don't run the strip command on both the
|
||||||
temporary system and the final system
|
temporary system and the final system
|
||||||
|
@ -79,8 +84,8 @@ Options:
|
||||||
|
|
||||||
-C, --kernel-config FILE use the kernel configuration file specified
|
-C, --kernel-config FILE use the kernel configuration file specified
|
||||||
in FILE to build the kernel. If the file is
|
in FILE to build the kernel. If the file is
|
||||||
not found, or if not specified, the kernel
|
not found, or if not specified, the kernel
|
||||||
build is skipped.
|
build is skipped.
|
||||||
|
|
||||||
-M, --run-make run make on the generated Makefile
|
-M, --run-make run make on the generated Makefile
|
||||||
|
|
||||||
|
@ -216,7 +221,7 @@ extract_commands() {
|
||||||
|
|
||||||
# Dump the commands in shell script form from the LFS book.
|
# Dump the commands in shell script form from the LFS book.
|
||||||
xsltproc --nonet --xinclude --stringparam testsuite $TEST \
|
xsltproc --nonet --xinclude --stringparam testsuite $TEST \
|
||||||
--stringparam toolchaintest $TOOLCHAINTEST --stringparam vim-lang $VIMLANG \
|
--stringparam vim-lang $VIMLANG \
|
||||||
-o ./commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
|
-o ./commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
|
||||||
|
|
||||||
# Make the scripts executable.
|
# Make the scripts executable.
|
||||||
|
@ -409,7 +414,7 @@ chapter5_Makefiles() {
|
||||||
i=`basename $file`
|
i=`basename $file`
|
||||||
|
|
||||||
# If no testsuites will be run, then TCL, Expect and DejaGNU aren't needed
|
# If no testsuites will be run, then TCL, Expect and DejaGNU aren't needed
|
||||||
if [ "$TOOLCHAINTEST" = "0" ]; then
|
if [ "$TEST" = "0" ]; then
|
||||||
if [[ `_IS_ $i tcl` ]] || [[ `_IS_ $i expect` ]] || [[ `_IS_ $i dejagnu` ]] ; then
|
if [[ `_IS_ $i tcl` ]] || [[ `_IS_ $i expect` ]] || [[ `_IS_ $i dejagnu` ]] ; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
@ -890,20 +895,20 @@ while test $# -gt 0 ; do
|
||||||
;;
|
;;
|
||||||
|
|
||||||
6.1.1 )
|
6.1.1 )
|
||||||
echo "For stable 6.1.1 book, please use jhalfs-0.2."
|
echo -e "\nFor stable 6.1.1 book, please use jhalfs-0.2."
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
alpha*)
|
alpha*)
|
||||||
LFSVRS=alphabetical
|
LFSVRS=alphabetical
|
||||||
;;
|
;;
|
||||||
|
|
||||||
udev*)
|
udev*)
|
||||||
LFSVRS=udev_update
|
LFSVRS=udev_update
|
||||||
;;
|
;;
|
||||||
|
|
||||||
* )
|
* )
|
||||||
echo "$1 is an unsupported version at this time."
|
echo -e "\n$1 is an unsupported version at this time."
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -939,14 +944,25 @@ while test $# -gt 0 ; do
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--testsuites | -T ) TEST=1 ;;
|
--testsuites | -T )
|
||||||
|
test $# = 1 && eval "$exit_missing_arg"
|
||||||
|
shift
|
||||||
|
case $1 in
|
||||||
|
0 | 1 | 2 | 3 )
|
||||||
|
TEST=$1
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
echo -e "\n$1 isn't a valid testsuites level value."
|
||||||
|
echo -e "You must to use 0, 1, 2, or 3.\n"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
|
||||||
--get-packages | -P ) HPKG=1 ;;
|
--get-packages | -P ) HPKG=1 ;;
|
||||||
|
|
||||||
--run-make | -M ) RUNMAKE=1 ;;
|
--run-make | -M ) RUNMAKE=1 ;;
|
||||||
|
|
||||||
--no-toolchain-test ) TOOLCHAINTEST=0 ;;
|
|
||||||
|
|
||||||
--no-strip ) STRIP=0 ;;
|
--no-strip ) STRIP=0 ;;
|
||||||
|
|
||||||
--no-vim-lang ) VIMLANG=0 ;;
|
--no-vim-lang ) VIMLANG=0 ;;
|
||||||
|
@ -959,13 +975,12 @@ while test $# -gt 0 ; do
|
||||||
PAGE=$1
|
PAGE=$1
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
echo "$1 isn't a supported page size."
|
echo -e "\n$1 isn't a supported page size."
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|
||||||
--timezone )
|
--timezone )
|
||||||
test $# = 1 && eval "$exit_missing_arg"
|
test $# = 1 && eval "$exit_missing_arg"
|
||||||
shift
|
shift
|
||||||
|
|
11
jhalfs.conf
11
jhalfs.conf
|
@ -17,11 +17,12 @@ HPKG=0
|
||||||
#--- Run the makefile at the end 0(no)/1(yes)
|
#--- Run the makefile at the end 0(no)/1(yes)
|
||||||
RUNMAKE=0
|
RUNMAKE=0
|
||||||
|
|
||||||
#--- Run test suites 0(no)/1(yes)
|
#--- Run test suites [0-3]
|
||||||
TEST=0
|
# 0 = none
|
||||||
|
# 1 = only chapter06 Glibc, GCC and Binutils testsuites
|
||||||
#--- Run the toolchain tests 0(no)/1(yes)
|
# 2 = all chapter06 testsuites
|
||||||
TOOLCHAINTEST=1
|
# 3 = all chapter05 and chapter06 testsuites
|
||||||
|
TEST=1
|
||||||
|
|
||||||
#--- Run the stripping phases 0(no)/1(yes)
|
#--- Run the stripping phases 0(no)/1(yes)
|
||||||
STRIP=1
|
STRIP=1
|
||||||
|
|
Reference in a new issue