More compare and related fixes.

Test build in progress.
This commit is contained in:
Manuel Canales Esparcia 2006-12-05 15:25:00 +00:00
parent 6bb080e696
commit 10c8b78425
7 changed files with 74 additions and 35 deletions

View file

@ -461,11 +461,13 @@ final_system_Makefiles() { #
sed -e 's/ln -sv/&f/g' \
-e 's/mv -v/&f/g' \
-e 's/mkdir -v/&p/g' -i ${script}
# Rename the scripts
mv ${script} ${script}$N
done
# Remove Bzip2 binaries before make install
sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2
sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2$N
# Delete *old Readline libraries just after make install
sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline
sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline$N
fi
if [[ "${METHOD}" = "chroot" ]]; then
@ -491,7 +493,8 @@ final_system_Makefiles() { #
-e 's@-64bit@@' \
-e 's@-64@@' \
-e 's@64@@' \
-e 's@n32@@'`
-e 's@n32@@' \
-e 's,'$N',,'`
# Find the version of the command files, if it corresponds with the building of
# a specific package. We need this here to can skip scripts not needed for
@ -507,7 +510,7 @@ final_system_Makefiles() { #
# Append each name of the script files to a list (this will become
# the names of the targets in the Makefile
basicsystem="$basicsystem ${this_script}${N}"
basicsystem="$basicsystem ${this_script}"
#--------------------------------------------------------------------#
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
@ -515,7 +518,7 @@ final_system_Makefiles() { #
#
# Drop in the name of the target on a new line, and the previous target
# as a dependency. Also call the echo_message function.
CHROOT_wrt_target "${this_script}${N}" "$PREV"
CHROOT_wrt_target "${this_script}" "$PREV"
# If $pkg_tarball isn't empty, we've got a package...
if [ "$pkg_tarball" != "" ] ; then
@ -523,10 +526,10 @@ final_system_Makefiles() { #
# If the testsuites must be run, initialize the log file
case $name in
binutils | gcc | glibc )
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}${N}"
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
;;
* )
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}${N}"
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}"
;;
esac
# If using optimizations, write the instructions
@ -545,7 +548,7 @@ final_system_Makefiles() { #
#--------------------------------------------------------------------#
#
# Keep the script file name for Makefile dependencies.
PREV=${this_script}${N}
PREV=${this_script}
# Set system_build envar for iteration targets
system_build=$basicsystem
done # for file in final-system/* ...

View file

@ -19,7 +19,7 @@ process_toolchain() { # embryo,cocoon and butterfly need special handling
local TC_MountPT
local remove_existing
tc_phase=`echo $toolchain | sed -e 's@[0-9]\{3\}-@@' -e 's@-toolchain@@'`
tc_phase=`echo $toolchain | sed -e 's@[0-9]\{3\}-@@' -e 's@-toolchain@@' -e 's,'$N',,'`
case $tc_phase in
embryo | \
cocoon) # Vars for LUSER phase
@ -268,16 +268,17 @@ chapter6_Makefiles() { # sysroot or chroot build phase
for script in chapter06$N/* ; do
# Overwrite existing symlinks, files, and dirs
sed -e 's/ln -s /ln -sf /g' \
-e 's/^mv /&-f/g' -i ${script}
-e 's/^mv /&-f /g' \
-e 's/mkdir -v/&p/g' -i ${script}
# Rename the scripts
mv ${script} ${script}$N
done
# Remove Bzip2 binaries before make install
sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2
sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2$N
# Fix how Module-Init-Tools do the install target
sed -e 's@make install@make INSTALL=install install@' -i chapter06$N/*-module-init-tools
# Delete *old Readline libraries just after make install
sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i chapter06$N/*-readline
sed -e 's@make install@make INSTALL=install install@' -i chapter06$N/*-module-init-tools$N
# Don't readd already existing groups
sed -e '/groupadd/d' -i chapter06$N/*-udev
sed -e '/groupadd/d' -i chapter06$N/*-udev$N
fi
echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6$N ( CHROOT ) ${R_arrow}"
@ -296,7 +297,7 @@ chapter6_Makefiles() { # sysroot or chroot build phase
esac
# Grab the name of the target
name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@' -e 's,'$N',,'`
case $name in
uclibc) name="uClibc" ;;
@ -315,7 +316,7 @@ chapter6_Makefiles() { # sysroot or chroot build phase
# Append each name of the script files to a list (this will become
# the names of the targets in the Makefile
chapter6="$chapter6 ${this_script}${N}"
chapter6="$chapter6 ${this_script}"
#--------------------------------------------------------------------#
@ -325,14 +326,14 @@ chapter6_Makefiles() { # sysroot or chroot build phase
# Drop in the name of the target on a new line, and the previous target
# as a dependency. Also call the echo_message function.
if [[ ${name} = "butterfly-toolchain" ]]; then
CHROOT_wrt_target "${this_script}${N}" "$PREV"
CHROOT_wrt_target "${this_script}" "$PREV"
process_toolchain "${this_script}" "${file}"
wrt_touch
PREV=$this_script
continue
fi
CHROOT_wrt_target "${this_script}${N}" "$PREV"
CHROOT_wrt_target "${this_script}" "$PREV"
# If $pkg_tarball isn't empty, we've got a package...
# Insert instructions for unpacking the package and changing directories
@ -341,9 +342,9 @@ chapter6_Makefiles() { # sysroot or chroot build phase
# If the testsuites must be run, initialize the log file
# butterfly-toolchain tests are enabled in 'process_tookchain' function
case $name in
glibc ) [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}${N}"
glibc ) [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
;;
* ) [[ "$TEST" > "1" ]] && CHROOT_wrt_test_log "${this_script}${N}"
* ) [[ "$TEST" > "1" ]] && CHROOT_wrt_test_log "${this_script}"
;;
esac
# If using optimizations, write the instructions
@ -373,7 +374,7 @@ chapter6_Makefiles() { # sysroot or chroot build phase
#--------------------------------------------------------------------#
# Keep the script file name for Makefile dependencies.
PREV=${this_script}${N}
PREV=${this_script}
# Set system_build envar for iteration targets
system_build=$chapter6
done # end for file in chapter06/*

View file

@ -177,9 +177,11 @@ chapter6_Makefiles() {
sed -e 's/ln -sv/&f/g' \
-e 's/mv -v/&f/g' \
-e 's/mkdir -v/&p/g' -i ${script}
# Rename the scripts
mv ${script} ${script}$N
done
# Remove Bzip2 binaries before make install
sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2
sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i chapter06$N/*-bzip2$N
fi
echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter6$N ( CHROOT ) ${R_arrow}"
@ -196,7 +198,7 @@ chapter6_Makefiles() {
esac
# Grab the name of the target.
name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@'`
name=`echo ${this_script} | sed -e 's@[0-9]\{3\}-@@' -e 's,'$N',,'`
# Find the version of the command files, if it corresponds with the building of
# a specific package. We need this here to can skip scripts not needed for
@ -215,7 +217,7 @@ chapter6_Makefiles() {
# The kernfs script must be run as part of SUDO target.
case "${this_script}" in
*kernfs) runasroot="$runasroot ${this_script}" ;;
*) chapter6="$chapter6 ${this_script}${N}" ;;
*) chapter6="$chapter6 ${this_script}" ;;
esac
#--------------------------------------------------------------------#
@ -228,7 +230,7 @@ chapter6_Makefiles() {
# and not to use chroot.
case "${this_script}" in
*kernfs) LUSER_wrt_target "${this_script}" "$PREV" ;;
*) CHROOT_wrt_target "${this_script}${N}" "$PREV" ;;
*) CHROOT_wrt_target "${this_script}" "$PREV" ;;
esac
# If $pkg_tarball isn't empty, we've got a package...
@ -238,10 +240,10 @@ chapter6_Makefiles() {
# If the testsuites must be run, initialize the log file
case $name in
binutils | gcc | glibc )
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}${N}"
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}"
;;
* )
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}${N}"
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}"
;;
esac
# If using optimizations, write the instructions
@ -269,7 +271,7 @@ chapter6_Makefiles() {
#--------------------------------------------------------------------#
# Keep the script file name for Makefile dependencies.
PREV=${this_script}${N}
PREV=${this_script}
# Set system_build envar for iteration targets
system_build=$chapter6
done # end for file in chapter06/*

View file

@ -55,7 +55,7 @@ clean_builddir() { #
else
# Clean the build directory
echo -n "Cleaning $BUILDDIR ..."
sudo rm -rf $BUILDDIR/{bin,boot,dev,etc,home,lib,media,mnt,opt,proc,root,sbin,srv,sys,tmp,tools,cross-tools,usr,var}
sudo rm -rf $BUILDDIR/{bin,boot,etc,home,lib,media,mnt,opt,root,sbin,srv,tmp,tools,cross-tools,usr,var}
echo "done"
echo -n "Cleaning $JHALFSDIR ..."
sudo rm -rf $JHALFSDIR

View file

@ -19,8 +19,8 @@ VERSION=$2
# If there is iteration logs directories, copy the logs inside iteration-1
# to the top level dir
[[ -d "$LOGSDIR"/iteration-1 ]] && \
cp $LOGSDIR/iteration-1/* $LOGSDIR
[[ -d "$LOGSDIR"/build_1 ]] && \
cp $LOGSDIR/build_1/* $LOGSDIR
# Set the report file
REPORT="$VERSION"-SBU_DU-$(date --iso-8601).report

View file

@ -13,6 +13,7 @@ wrt_compare_targets() { #
this_script=$ITERATION
CHROOT_wrt_target "$ITERATION" "$PREV"
wrt_compare_work "$ITERATION" "$PREV_IT"
wrt_logs "$N"
wrt_touch
PREV_IT=$ITERATION
PREV=$ITERATION
@ -46,8 +47,6 @@ wrt_system_build() { #
chapter6="$chapter6 iteration-$RUN"
fi
fi
echo -e "\nsystem_build_$RUN: $PREV_IT $system_build" >> $MKFILE.tmp
}
#----------------------------------#
@ -106,3 +105,37 @@ wrt_do_farce_work() { #
local ITEFILE=$3/filelist-$2
echo -e "\t@extras/farce --directory $OUTPUT $PREDIR $PREFILE $ITEDIR $ITEFILE >>logs/\$@ 2>&1" >> $MKFILE.tmp
}
#----------------------------------#
wrt_logs() { #
#----------------------------------#
local build=build_$1
local file
(
cat << EOF
@cd logs && \\
mkdir $build && \\
mv -f ${system_build} $build && \\
if [ ! $build = build_1 ] ; then \\
cd $build && \\
for file in \`ls .\` ; do \\
mv -f \$\$file \`echo \$\$file | sed -e 's,-$build,,'\` ; \\
done ; \\
fi ;
@cd /\$(SCRIPT_ROOT)
@if [ -d test-logs ] ; then \\
cd test-logs && \\
mkdir $build && \\
mv -f ${system_build} $build && \\
if [ ! $build = build_1 ] ; then \\
cd $build && \\
for file in \`ls .\` ; do \\
mv -f \$\$file \`echo \$\$file | sed -e 's,-$build,,'\` ; \\
done ; \\
fi ; \\
cd /\$(SCRIPT_ROOT) ; \\
fi ;
EOF
) >> $MKFILE.tmp
}

View file

@ -186,7 +186,7 @@ LUSER_wrt_test_log() { # Initialize testsuite log file
(
cat << EOF
@echo "export TEST_LOG=\$(TESTLOGDIR)/$TESTLOGFILE" >> envars && \\
echo '\$(nl_)\`date\`\$(nl_)' >\$(TESTLOGDIR)/\$@
echo "\$(nl_)\`date\`\$(nl_)" >\$(TESTLOGDIR)/\$@
EOF
) >> $MKFILE.tmp
}