Added COMPARE config option to avoid to have to test if RUN_ICA or RUN_FARCE are set.
Changed ICA_rebuild by system_rebuild.
This commit is contained in:
parent
02d1ae7ee9
commit
fb68d2315d
4 changed files with 29 additions and 23 deletions
|
@ -156,8 +156,8 @@ chapter6_Makefiles() {
|
||||||
case "${this_script}" in
|
case "${this_script}" in
|
||||||
*chroot) continue ;;
|
*chroot) continue ;;
|
||||||
*stripping*) [[ "${STRIP}" = "0" ]] && continue
|
*stripping*) [[ "${STRIP}" = "0" ]] && continue
|
||||||
[[ "${STRIP}" != "0" ]] && [[ "$RUN_ICA" != "0" ]] && \
|
[[ "${STRIP}" != "0" ]] && [[ "$COMPARE" != "0" ]] && \
|
||||||
ICA_rebuild="$ICA_rebuild ${this_script}"
|
system_rebuild="$system_rebuild ${this_script}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -185,8 +185,8 @@ chapter6_Makefiles() {
|
||||||
if [ "$vrs" != "" ] ; then
|
if [ "$vrs" != "" ] ; then
|
||||||
FILE="$name-$vrs.tar.*"
|
FILE="$name-$vrs.tar.*"
|
||||||
wrt_unpack2 "$FILE"
|
wrt_unpack2 "$FILE"
|
||||||
# Add it to the ICA_rebuild target
|
# Add it to the system_rebuild target
|
||||||
[[ "$RUN_ICA" != "0" ]] && ICA_rebuild="$ICA_rebuild ${this_script}"
|
[[ "$COMPARE" != "0" ]] && system_rebuild="$system_rebuild ${this_script}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# In the mount of kernel filesystems we need to set LFS
|
# In the mount of kernel filesystems we need to set LFS
|
||||||
|
@ -219,8 +219,8 @@ chapter789_Makefiles() {
|
||||||
#----------------------------#
|
#----------------------------#
|
||||||
echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter7/8/9${R_arrow}"
|
echo "${tab_}${GREEN}Processing... ${L_arrow}Chapter7/8/9${R_arrow}"
|
||||||
|
|
||||||
# Reset $PREV for ICA runs
|
# Reset $PREV for ICA/farce runs
|
||||||
[[ "$RUN_ICA" != "0" ]] && PREV=iteration-last
|
[[ "$COMPARE" != "0" ]] && PREV=iteration-last
|
||||||
|
|
||||||
for file in chapter0{7,8,9}/* ; do
|
for file in chapter0{7,8,9}/* ; do
|
||||||
# Keep the script file name
|
# Keep the script file name
|
||||||
|
@ -401,8 +401,8 @@ restore-lfs-env:
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $MKFILE
|
||||||
|
|
||||||
# Add the ICA targets
|
# Add the ICA/farce targets
|
||||||
[[ "$RUN_ICA" != "0" ]] && wrt_ica_targets "$ICA_rebuild"
|
[[ "$COMPARE" != "0" ]] && wrt_ica_targets "$system_rebuild"
|
||||||
|
|
||||||
# Bring over the items from the Makefile.tmp
|
# Bring over the items from the Makefile.tmp
|
||||||
cat $MKFILE.tmp >> $MKFILE
|
cat $MKFILE.tmp >> $MKFILE
|
||||||
|
|
|
@ -59,16 +59,19 @@ LC_ALL=$LC_ALL # (not used in LFS)
|
||||||
KEYMAP=none
|
KEYMAP=none
|
||||||
|
|
||||||
#=== Variables needed by iterative comparison analysis ===
|
#=== Variables needed by iterative comparison analysis ===
|
||||||
|
#--- Should some iterative comparison analysis by made? 0(no)/1(yes)
|
||||||
|
COMPARE=0
|
||||||
|
|
||||||
#--- The number of final stage builds to create and compare, min. 2, max. 5
|
#--- The number of final stage builds to create and compare, min. 2, max. 5
|
||||||
ITERATIONS=3
|
ITERATIONS=3
|
||||||
|
|
||||||
#--- Run ICA testing 0/1 0(no)/1(yes)
|
#--- Run ICA testing 0(no)/1(yes)
|
||||||
RUN_ICA=0
|
RUN_ICA=0
|
||||||
|
|
||||||
#--- ICA report log directory
|
#--- ICA report log directory
|
||||||
ICALOGDIR=$JHALFSDIR/logs/ICA
|
ICALOGDIR=$JHALFSDIR/logs/ICA
|
||||||
|
|
||||||
#--- Run farce testing 0/1 0(no)/1(yes)
|
#--- Run farce testing 0(no)/1(yes)
|
||||||
RUN_FARCE=0
|
RUN_FARCE=0
|
||||||
|
|
||||||
#--- farce report log directory
|
#--- farce report log directory
|
||||||
|
|
|
@ -3,18 +3,18 @@
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
wrt_ica_targets() { #
|
wrt_ica_targets() { #
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
local ICA_rebuild=$1
|
local system_rebuild=$1
|
||||||
wrt_ica_rebuild "$ICA_rebuild"
|
wrt_system_rebuild "$system_rebuild"
|
||||||
wrt_iterations "$ICA_rebuild"
|
wrt_iterations "$system_rebuild"
|
||||||
}
|
}
|
||||||
|
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
wrt_ica_rebuild() { #
|
wrt_system_rebuild() { #
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
local ICA_rebuild=$1
|
local system_rebuild=$1
|
||||||
(
|
(
|
||||||
cat << EOF
|
cat << EOF
|
||||||
ICA_rebuild: $ICA_rebuild
|
system_rebuild: $system_rebuild
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE
|
) >> $MKFILE
|
||||||
|
@ -23,7 +23,7 @@ EOF
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
wrt_iterations() { #
|
wrt_iterations() { #
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
local ICA_rebuild=$1
|
local system_rebuild=$1
|
||||||
|
|
||||||
for ((N=1; N <= ITERATIONS ; N++)) ; do # Double parentheses,
|
for ((N=1; N <= ITERATIONS ; N++)) ; do # Double parentheses,
|
||||||
# and "ITERATIONS" with no "$".
|
# and "ITERATIONS" with no "$".
|
||||||
|
@ -35,9 +35,9 @@ $ITERATION: chapter06
|
||||||
@do_ica_prep
|
@do_ica_prep
|
||||||
@pushd logs && \\
|
@pushd logs && \\
|
||||||
mkdir $ITERATION && \\
|
mkdir $ITERATION && \\
|
||||||
mv $ICA_rebuild $ITERATION && \\
|
mv $system_rebuild $ITERATION && \\
|
||||||
popd
|
popd
|
||||||
@rm -f $ICA_rebuild
|
@rm -f $system_rebuild
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
@ -50,7 +50,7 @@ iteration-last: $PREV ICA_rebuild
|
||||||
@do_ica_prep
|
@do_ica_prep
|
||||||
@pushd logs && \\
|
@pushd logs && \\
|
||||||
mkdir iteration-last && \\
|
mkdir iteration-last && \\
|
||||||
cp $ICA_rebuild iteration-last && \\
|
cp $system_rebuild iteration-last && \\
|
||||||
popd
|
popd
|
||||||
@do_ica_work
|
@do_ica_work
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
@ -64,9 +64,9 @@ $ITERATION: $PREV ICA_rebuild
|
||||||
@do_ica_prep
|
@do_ica_prep
|
||||||
@pushd logs && \\
|
@pushd logs && \\
|
||||||
mkdir $ITERATION && \\
|
mkdir $ITERATION && \\
|
||||||
mv $ICA_rebuild $ITERATION && \\
|
mv $system_rebuild $ITERATION && \\
|
||||||
popd
|
popd
|
||||||
@rm -f $ICA_rebuild
|
@rm -f $system_rebuild
|
||||||
@touch \$@
|
@touch \$@
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -220,12 +220,15 @@ while test $# -gt 0 ; do
|
||||||
case $1 in
|
case $1 in
|
||||||
ICA) RUN_ICA=1
|
ICA) RUN_ICA=1
|
||||||
RUN_FARCE=0
|
RUN_FARCE=0
|
||||||
|
COMPARE=1
|
||||||
;;
|
;;
|
||||||
farce) RUN_ICA=0
|
farce) RUN_ICA=0
|
||||||
RUN_FARCE=1
|
RUN_FARCE=1
|
||||||
|
COMPARE=1
|
||||||
;;
|
;;
|
||||||
both) RUN_ICA=1
|
both) RUN_ICA=1
|
||||||
RUN_FARCE=1
|
RUN_FARCE=1
|
||||||
|
COMPARE=1
|
||||||
*)
|
*)
|
||||||
echo -e "\n$1 is an unknown analisys method."
|
echo -e "\n$1 is an unknown analisys method."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -478,7 +481,7 @@ fi
|
||||||
|
|
||||||
if [[ "$PWD" != "$JHALFSDIR" ]]; then
|
if [[ "$PWD" != "$JHALFSDIR" ]]; then
|
||||||
cp $COMMON_DIR/makefile-functions $JHALFSDIR/
|
cp $COMMON_DIR/makefile-functions $JHALFSDIR/
|
||||||
if [[ "$RUN_ICA" = "1" ]] || [[ "$RUN_FARCE" = "1" ]]; then
|
if [[ "$COMPARE" != "0" ]] ; then
|
||||||
mkdir $JHALFSDIR/extras
|
mkdir $JHALFSDIR/extras
|
||||||
cp extras/* $JHALFSDIR/extras
|
cp extras/* $JHALFSDIR/extras
|
||||||
fi
|
fi
|
||||||
|
|
Reference in a new issue