Revised compare code. Test build in progres.

This commit is contained in:
Manuel Canales Esparcia 2006-12-04 20:58:09 +00:00
parent ac35c8e7d2
commit 6bb080e696
5 changed files with 18 additions and 56 deletions

View file

@ -447,7 +447,6 @@ testsuite_tools_Makefiles() { #
final_system_Makefiles() { #
#--------------------------------------#
# Set envars and scripts for iteration targets
LOGS="" # Start with an empty global LOGS envar
if [[ -z "$1" ]] ; then
local N=""
# In boot method the makesys phase was initiated in testsuite_tools_makefile
@ -510,10 +509,6 @@ final_system_Makefiles() { #
# the names of the targets in the Makefile
basicsystem="$basicsystem ${this_script}${N}"
# Append each name of the script files to a list (this will become
# the names of the logs to be moved for each iteration)
LOGS="$LOGS ${this_script}"
#--------------------------------------------------------------------#
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
#--------------------------------------------------------------------#
@ -528,10 +523,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}"
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}${N}"
;;
* )
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}"
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}${N}"
;;
esac
# If using optimizations, write the instructions

View file

@ -258,7 +258,6 @@ chapter6_Makefiles() { # sysroot or chroot build phase
local file
local this_script
# Set envars and scripts for iteration targets
LOGS="" # Start with an empty global LOGS envar
if [[ -z "$1" ]] ; then
local N=""
else
@ -318,10 +317,6 @@ chapter6_Makefiles() { # sysroot or chroot build phase
# the names of the targets in the Makefile
chapter6="$chapter6 ${this_script}${N}"
# Append each name of the script files to a list (this will become
# the names of the logs to be moved for each iteration)
LOGS="$LOGS ${this_script}"
#--------------------------------------------------------------------#
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
@ -346,9 +341,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}"
glibc ) [[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}${N}"
;;
* ) [[ "$TEST" > "1" ]] && CHROOT_wrt_test_log "${this_script}"
* ) [[ "$TEST" > "1" ]] && CHROOT_wrt_test_log "${this_script}${N}"
;;
esac
# If using optimizations, write the instructions

View file

@ -165,7 +165,6 @@ chapter6_Makefiles() {
#----------------------------#
# Set envars and scripts for iteration targets
LOGS="" # Start with an empty global LOGS envar
if [[ -z "$1" ]] ; then
local N=""
else
@ -219,10 +218,6 @@ chapter6_Makefiles() {
*) chapter6="$chapter6 ${this_script}${N}" ;;
esac
# Append each name of the script files to a list (this will become
# the names of the logs to be moved for each iteration)
LOGS="$LOGS ${this_script}"
#--------------------------------------------------------------------#
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
#--------------------------------------------------------------------#
@ -243,10 +238,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}"
[[ "$TEST" != "0" ]] && CHROOT_wrt_test_log "${this_script}${N}"
;;
* )
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}"
[[ "$TEST" = "2" ]] || [[ "$TEST" = "3" ]] && CHROOT_wrt_test_log "${this_script}${N}"
;;
esac
# If using optimizations, write the instructions

View file

@ -13,7 +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
done
@ -67,8 +67,8 @@ wrt_compare_work() { #
local DEST_ICA=$DEST_TOPDIR/ICA && \
(
cat << EOF
@extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_ICA/$ITERATION >>logs/$ITERATION.log 2>&1 && \\
extras/do_ica_prep $DEST_ICA/$ITERATION >>logs/$ITERATION.log 2>&1
@extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_ICA/$ITERATION >>logs/\$@ 2>&1 && \\
extras/do_ica_prep $DEST_ICA/$ITERATION >>logs/\$@ 2>&1
EOF
) >> $MKFILE.tmp
if [[ "$ITERATION" != "iteration-1" ]] ; then
@ -80,8 +80,8 @@ EOF
local DEST_FARCE=$DEST_TOPDIR/farce && \
(
cat << EOF
@extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_FARCE/$ITERATION >>logs/$ITERATION.log 2>&1 && \\
extras/filelist $DEST_FARCE/$ITERATION $DEST_FARCE/filelist-$ITERATION >>logs/$ITERATION.log 2>&1
@extras/do_copy_files "$PRUNEPATH" $ROOT_DIR $DEST_FARCE/$ITERATION >>logs/\$@ 2>&1 && \\
extras/filelist $DEST_FARCE/$ITERATION $DEST_FARCE/filelist-$ITERATION >>logs/\$@ 2>&1
EOF
) >> $MKFILE.tmp
if [[ "$ITERATION" != "iteration-1" ]] ; then
@ -93,7 +93,7 @@ EOF
#----------------------------------#
wrt_do_ica_work() { #
#----------------------------------#
echo -e "\t@extras/do_ica_work $1 $2 $ICALOGDIR $3 >>logs/$ITERATION.log 2>&1" >> $MKFILE.tmp
echo -e "\t@extras/do_ica_work $1 $2 $ICALOGDIR $3 >>logs/\$@ 2>&1" >> $MKFILE.tmp
}
#----------------------------------#
@ -104,24 +104,5 @@ wrt_do_farce_work() { #
local PREFILE=$3/filelist-$1
local ITEDIR=$3/$2
local ITEFILE=$3/filelist-$2
echo -e "\t@extras/farce --directory $OUTPUT $PREDIR $PREFILE $ITEDIR $ITEFILE >>logs/$ITERATION.log 2>&1" >> $MKFILE.tmp
}
#----------------------------------#
wrt_logs() { #
#----------------------------------#
local ITERATION=iteration-$1
(
cat << EOF
@pushd logs 1> /dev/null && \\
mkdir $ITERATION && \\
mv ${LOGS} $ITERATION && \\
popd 1> /dev/null
@touch \$@ && \\
sleep .25 && \\
echo " "\$(BOLD)Target \$(BLUE)\$@ \$(BOLD)OK && \\
echo --------------------------------------------------------------------------------\$(WHITE)
EOF
) >> $MKFILE.tmp
echo -e "\t@extras/farce --directory $OUTPUT $PREDIR $PREFILE $ITEDIR $ITEFILE >>logs/\$@ 2>&1" >> $MKFILE.tmp
}

View file

@ -114,18 +114,14 @@ CHROOT_wrt_target() { # Create target and initialize log file
#----------------------------------#
local i=$1
local PREV=$2
case $i in
iteration* ) local LOGFILE="${this_script}.log" ;;
* ) local LOGFILE="\$@" ;;
esac
(
cat << EOF
$i: $PREV
@\$(call echo_message, Building)
@./progress_bar.sh \$@ \$\$PPID &
@echo "\$(nl_)\`date\`\$(nl_)" >logs/$LOGFILE
@\$(PRT_DU_CR) >>logs/$LOGFILE
@echo "\$(nl_)\`date\`\$(nl_)" >logs/\$@
@\$(PRT_DU_CR) >>logs/\$@
EOF
) >> $MKFILE.tmp
}
@ -189,8 +185,8 @@ LUSER_wrt_test_log() { # Initialize testsuite log file
local TESTLOGFILE=$1
(
cat << EOF
@echo "export TEST_LOG=$TESTLOGDIR/$TESTLOGFILE" >> envars && \\
echo '\$(nl_)\`date\`\$(nl_)' >$TESTLOGDIR/$TESTLOGFILE
@echo "export TEST_LOG=\$(TESTLOGDIR)/$TESTLOGFILE" >> envars && \\
echo '\$(nl_)\`date\`\$(nl_)' >\$(TESTLOGDIR)/\$@
EOF
) >> $MKFILE.tmp
}
@ -202,7 +198,7 @@ CHROOT_wrt_test_log() { #
(
cat << EOF
@echo "export TEST_LOG=\$(crTESTLOGDIR)/$TESTLOGFILE" >> envars && \\
echo "\$(nl_)\`date\`\$(nl_)" >test-logs/$TESTLOGFILE
echo "\$(nl_)\`date\`\$(nl_)" >test-logs/\$@
EOF
) >> $MKFILE.tmp
}