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)
|
||||
|
||||
|
||||
MASTER SCRIPT (work in progress on the experimental branch)
|
||||
MASTER SCRIPT
|
||||
-------------
|
||||
|
||||
- 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 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
|
||||
of the same package are founds in the sources dir.
|
||||
|
||||
|
|
|
@ -11,11 +11,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"/>
|
||||
<!-- Run test suites?
|
||||
0 = none
|
||||
1 = only chapter06 Glibc, GCC and Binutils testsuites
|
||||
2 = all chapter06 testsuites
|
||||
3 = all chapter05 and chapter06 testsuites-->
|
||||
<xsl:param name="testsuite" select="1"/>
|
||||
|
||||
<!-- Install vim-lang package? -->
|
||||
<xsl:param name="vim-lang" select="1"/>
|
||||
|
@ -76,26 +77,27 @@
|
|||
</xsl:if>
|
||||
</xsl:if>
|
||||
<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>
|
||||
</exsl:document>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="screen">
|
||||
<xsl:if test="child::* = userinput">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@role = 'nodump'"/>
|
||||
<xsl:otherwise>
|
||||
<xsl:apply-templates select="userinput" mode="screen"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="child::* = userinput and not(@role = 'nodump')">
|
||||
<xsl:apply-templates select="userinput" mode="screen"/>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="para/userinput">
|
||||
<xsl:if test="$testsuite != '0' and
|
||||
(contains(string(),'test') or
|
||||
contains(string(),'check'))">
|
||||
<xsl:if test="(contains(string(),'test') or
|
||||
contains(string(),'check')) and
|
||||
(($testsuite = '2' and
|
||||
ancestor::chapter[@id='chapter-building-system']) or
|
||||
$testsuite = '3')">
|
||||
<xsl:value-of select="substring-before(string(),'make')"/>
|
||||
<xsl:text>make -k</xsl:text>
|
||||
<xsl:value-of select="substring-after(string(),'make')"/>
|
||||
|
@ -125,7 +127,7 @@
|
|||
<xsl:text>cp -v ../kernel-config .config
</xsl:text>
|
||||
</xsl:when>
|
||||
<!-- 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-module-init-tools']) and
|
||||
(contains(string(),'check') or
|
||||
|
@ -134,32 +136,33 @@
|
|||
<xsl:when test="string() = 'make check' or
|
||||
string() = 'make -k check'">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$toolchaintest = '0'"/>
|
||||
<xsl:otherwise>
|
||||
<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>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(string(),'glibc-check-log')">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$toolchaintest = '0'"/>
|
||||
<xsl:otherwise>
|
||||
<xsl:when test="$testsuite != '0'">
|
||||
<xsl:value-of select="substring-before(string(),'
')"/>
|
||||
<xsl:text> || true
</xsl:text>
|
||||
<xsl:value-of select="substring-after(string(),'
')"/>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:when test="contains(string(),'test_summary') or
|
||||
contains(string(),'expect -c')">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$toolchaintest = '0'"/>
|
||||
<xsl:otherwise>
|
||||
<xsl:when test="(($testsuite = '1' or $testsuite = '2') and
|
||||
ancestor::chapter[@id='chapter-building-system']) or
|
||||
$testsuite = '3'">
|
||||
<xsl:apply-templates/>
|
||||
<xsl:text>
</xsl:text>
|
||||
</xsl:otherwise>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<!-- 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.
|
||||
|
||||
-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
|
||||
also disables the build of TCL, Expect
|
||||
and DejaGNU
|
||||
0 No testsuites run. This also disables the
|
||||
build of TCL, Expect 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
|
||||
temporary system and the final system
|
||||
|
@ -79,8 +84,8 @@ Options:
|
|||
|
||||
-C, --kernel-config FILE use the kernel configuration file specified
|
||||
in FILE to build the kernel. If the file is
|
||||
not found, or if not specified, the kernel
|
||||
build is skipped.
|
||||
not found, or if not specified, the kernel
|
||||
build is skipped.
|
||||
|
||||
-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.
|
||||
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
|
||||
|
||||
# Make the scripts executable.
|
||||
|
@ -409,7 +414,7 @@ chapter5_Makefiles() {
|
|||
i=`basename $file`
|
||||
|
||||
# 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
|
||||
continue
|
||||
fi
|
||||
|
@ -890,20 +895,20 @@ while test $# -gt 0 ; do
|
|||
;;
|
||||
|
||||
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
|
||||
;;
|
||||
|
||||
alpha*)
|
||||
LFSVRS=alphabetical
|
||||
;;
|
||||
alpha*)
|
||||
LFSVRS=alphabetical
|
||||
;;
|
||||
|
||||
udev*)
|
||||
LFSVRS=udev_update
|
||||
;;
|
||||
udev*)
|
||||
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
|
||||
;;
|
||||
esac
|
||||
|
@ -939,14 +944,25 @@ while test $# -gt 0 ; do
|
|||
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 ;;
|
||||
|
||||
--run-make | -M ) RUNMAKE=1 ;;
|
||||
|
||||
--no-toolchain-test ) TOOLCHAINTEST=0 ;;
|
||||
|
||||
--no-strip ) STRIP=0 ;;
|
||||
|
||||
--no-vim-lang ) VIMLANG=0 ;;
|
||||
|
@ -959,13 +975,12 @@ while test $# -gt 0 ; do
|
|||
PAGE=$1
|
||||
;;
|
||||
* )
|
||||
echo "$1 isn't a supported page size."
|
||||
echo -e "\n$1 isn't a supported page size."
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
|
||||
--timezone )
|
||||
test $# = 1 && eval "$exit_missing_arg"
|
||||
shift
|
||||
|
|
11
jhalfs.conf
11
jhalfs.conf
|
@ -17,11 +17,12 @@ HPKG=0
|
|||
#--- Run the makefile at the end 0(no)/1(yes)
|
||||
RUNMAKE=0
|
||||
|
||||
#--- Run test suites 0(no)/1(yes)
|
||||
TEST=0
|
||||
|
||||
#--- Run the toolchain tests 0(no)/1(yes)
|
||||
TOOLCHAINTEST=1
|
||||
#--- Run test suites [0-3]
|
||||
# 0 = none
|
||||
# 1 = only chapter06 Glibc, GCC and Binutils testsuites
|
||||
# 2 = all chapter06 testsuites
|
||||
# 3 = all chapter05 and chapter06 testsuites
|
||||
TEST=1
|
||||
|
||||
#--- Run the stripping phases 0(no)/1(yes)
|
||||
STRIP=1
|
||||
|
|
Reference in a new issue