Made existing tests comply to upcomming prescriptions for failure messages

This commit is contained in:
Thomas Schmitt 2011-08-05 15:43:58 +00:00
parent 136c3adf6c
commit bbfe2e7a6e
4 changed files with 21 additions and 21 deletions

View File

@ -58,7 +58,7 @@ fi
if [ ${RET_CPL} == 0 -a -f ${SMPL}.obj ]; then if [ ${RET_CPL} == 0 -a -f ${SMPL}.obj ]; then
mv ${SMPL}.obj ${GEN_DATA_DIR} mv ${SMPL}.obj ${GEN_DATA_DIR}
else else
printf "\n${SELF}: FAIL Compilation of ${SMPL}\n" printf "\nFAIL : ${SELF}: Compilation of ${SMPL}\n"
cleanup cleanup
exit 7 exit 7
fi fi

View File

@ -63,7 +63,7 @@ test -z "$in_iso" && in_iso="$on_disk"
mkdir "$on_disk" || bad=1 mkdir "$on_disk" || bad=1
if test "$bad" = 1 if test "$bad" = 1
then then
echo -e "\n${SELF}: FAIL : Test environment error : Cannot make directories" echo -e "\nFAIL : ${SELF} : Test environment error : Cannot make directories"
exit 3 exit 3
fi fi
@ -81,13 +81,13 @@ is_valid_iso9660() {
ISOfile="$1" ISOfile="$1"
if [ ! -f ${ISOfile} ]; then if [ ! -f ${ISOfile} ]; then
failure=1 failure=1
printf "\n${SELF}: FAIL : Not found: ${ISOfile}\n" printf "\nFAIL : ${SELF} : Not found: ${ISOfile}\n"
fi fi
if file ${ISOfile} | grep -P "ISO\s+9660\s+CD-ROM\s+filesystem\s+data" >/dev/null 2>&1; then if file ${ISOfile} | grep -P "ISO\s+9660\s+CD-ROM\s+filesystem\s+data" >/dev/null 2>&1; then
printf "\n${SELF}: Resulting ${ISOfile} OK. Looks like ISO 9660 filesystem.\n" printf "\n${SELF}: Resulting ${ISOfile} OK. Looks like ISO 9660 filesystem.\n"
else else
failure=1 failure=1
printf "\n${SELF}: FAIL : ${ISOfile} DOES NOT look like ISO 9660 filesystem data.\n" printf "\nFAIL : ${SELF} : ${ISOfile} DOES NOT look like ISO 9660 filesystem data.\n"
fi fi
} }
@ -140,10 +140,10 @@ then
failure=1 failure=1
echo >&2 echo >&2
echo "$msg" >&2 echo "$msg" >&2
printf "\n${SELF}: FAIL : -assert_volid test not properly performed\n\n" >&2 printf "\nFAIL : ${SELF} : -assert_volid test not properly performed\n\n" >&2
else else
failure=1 failure=1
printf "\n${SELF}: FAIL : -assert_volid did not snap\n\n" >&2 printf "\nFAIL : ${SELF} : -assert_volid did not snap\n\n" >&2
fi fi
echo -e "\n${SELF}: Copying from image to temporary disk tree" >&2 echo -e "\n${SELF}: Copying from image to temporary disk tree" >&2
@ -167,7 +167,7 @@ fi
if test "$simulate_failure" = 1 if test "$simulate_failure" = 1
then then
echo -e "\n${SELF}: SIMULATING FAILURE BY REMOVING AN EXTRACTED FILE" >&2 echo -e "\n${SELF}: SIMULATING FAILURE BY REMOVING AN EXTRACTED FILE" >&2
echo -e "\n${SELF}: FAIL : Simulated failure caused by option -fail" echo -e "\nFAIL : ${SELF} : Simulated failure caused by option -fail"
rm "$copy_on_disk"/file_1_link_b rm "$copy_on_disk"/file_1_link_b
fi fi
@ -176,8 +176,8 @@ printf "\n${SELF}: Comparing original disk tree and temporary one..." >&2
diff -r "$on_disk" "$copy_on_disk" diff -r "$on_disk" "$copy_on_disk"
if test "$?" -ne 0 if test "$?" -ne 0
then then
echo -e "\n${SELF}: FAIL : diff -r $on_disk $copy_on_disk reports differences" >&2 echo -e "\nFAIL : ${SELF} : diff -r $on_disk $copy_on_disk reports differences" >&2
echo -e "\n${SELF}: FAIL : diff -r reports differences" echo -e "\nFAIL : ${SELF} : diff -r reports differences"
failure=1 failure=1
else else
printf "OK" >&2 printf "OK" >&2
@ -191,7 +191,7 @@ if test x"$x" = x"$expected"
then then
printf "\n${SELF}: Checking for hardlinks being siblings. Done. OK.\n" >&2 printf "\n${SELF}: Checking for hardlinks being siblings. Done. OK.\n" >&2
else else
printf "\n${SELF}: FAIL : Link count of extracted files is not as expected." >&2 printf "\nFAIL : ${SELF} : Link count of extracted files is not as expected." >&2
printf "\n${SELF}: Expected: $expected" >&2 printf "\n${SELF}: Expected: $expected" >&2
printf "\n${SELF}: Got : $x\n" >&2 printf "\n${SELF}: Got : $x\n" >&2
failure=1 failure=1

View File

@ -102,7 +102,7 @@ if test -e "$dev"
then then
if test "$any_media" = 1 -a -f "$dev" if test "$any_media" = 1 -a -f "$dev"
then then
echo "FAIL: ${SELF} : --dev $dev leads to an existing regular file" echo "FAIL : ${SELF} : --dev $dev leads to an existing regular file"
echo echo
cleanup cleanup
exit 31 exit 31
@ -110,7 +110,7 @@ then
else else
if test "$any_media" = "0" if test "$any_media" = "0"
then then
echo "FAIL: ${SELF} : --dev $dev does not lead to an existing file" echo "FAIL : ${SELF} : --dev $dev does not lead to an existing file"
echo echo
cleanup cleanup
exit 31 exit 31
@ -125,7 +125,7 @@ set -e
if test "$ret" -ne 0 if test "$ret" -ne 0
then then
echo "$res" >&2 echo "$res" >&2
echo "FAIL: ${SELF} : Non-zero exit value $ret with: $RELENG_XORRISO -outdev $dev" echo "FAIL : ${SELF} : Non-zero exit value $ret with: $RELENG_XORRISO -outdev $dev"
echo echo
cleanup cleanup
exit 1 exit 1
@ -141,7 +141,7 @@ then
echo "Recognized as re-usable." echo "Recognized as re-usable."
elif test "$media" = "is not recognizable" elif test "$media" = "is not recognizable"
then then
echo "FAIL: ${SELF} : No recognizable media detected in: '$dev'" echo "FAIL : ${SELF} : No recognizable media detected in: '$dev'"
echo echo
cleanup cleanup
exit 2 exit 2
@ -149,7 +149,7 @@ then
then then
echo "Accepted media only because of option --any_media : '$media'" echo "Accepted media only because of option --any_media : '$media'"
else else
echo "FAIL: ${SELF} : No re-usable media detected, but: '$media'" echo "FAIL : ${SELF} : No re-usable media detected, but: '$media'"
echo echo
cleanup cleanup
exit 2 exit 2
@ -168,7 +168,7 @@ ret=$?
set -e set -e
if test "$ret" -ne 0 if test "$ret" -ne 0
then then
echo "FAIL: ${SELF} : Non-zero exit value with burn run: $ret" echo "FAIL : ${SELF} : Non-zero exit value with burn run: $ret"
echo echo
cleanup cleanup
exit 1 exit 1
@ -176,7 +176,7 @@ fi
if test "$SIMULATE_FAILURE" = 1 if test "$SIMULATE_FAILURE" = 1
then then
echo "FAIL: ${SELF} : Simulated failure caused by option -f" echo "FAIL : ${SELF} : Simulated failure caused by option -f"
if test -f "$dev" if test -f "$dev"
then then
# Alter image # Alter image
@ -202,7 +202,7 @@ ret=$?
set -e set -e
if test "$ret" -ne 0 if test "$ret" -ne 0
then then
echo "FAIL: ${SELF} : Non-zero exit value with checkread run: $ret" echo "FAIL : ${SELF} : Non-zero exit value with checkread run: $ret"
echo echo
cleanup cleanup
exit 1 exit 1

View File

@ -78,7 +78,7 @@ case ${RETCODE_VER_JTE} in
printf "\n${SELF}: Found JTE support with ${RELENG_XORRISO} : ${RETSTR_VER_JTE}" printf "\n${SELF}: Found JTE support with ${RELENG_XORRISO} : ${RETSTR_VER_JTE}"
;; ;;
*) *)
printf "\n${SELF}: FAIL: Not found JTE support in ${RELENG_XORRISO}. Quit." printf "\nFAIL : ${SELF} : Not found JTE support in ${RELENG_XORRISO}. Quit."
printf "\n${SELF}: JTE not supported with this xorriso build. Install jigit >=1.18 and rebuild." printf "\n${SELF}: JTE not supported with this xorriso build. Install jigit >=1.18 and rebuild."
printf "\n${SELF}: http://www.einval.com/~steve/software/JTE/\n" printf "\n${SELF}: http://www.einval.com/~steve/software/JTE/\n"
cleanup cleanup
@ -97,7 +97,7 @@ if [ ! -f "${TMP_DATA_DIR}"/"${REMOTE_IMG}" ]; then
echo -e "\n${SELF}: Downloading successfully completed.\n" echo -e "\n${SELF}: Downloading successfully completed.\n"
;; ;;
*) *)
echo -e "\n${SELF}: FAIL: wget returned code: $WGET_RET\n" echo -e "\nFAIL : ${SELF} : wget returned code: $WGET_RET\n"
cleanup cleanup
exit 5 exit 5
;; ;;
@ -231,7 +231,7 @@ case ${DIFF_RET} in
echo -e "${SELF}: Match: diff ${GEN_DATA_DIR}/${RELENG_IMG}.iso ${GEN_DATA_DIR}/${RELENG_IMG}.new" echo -e "${SELF}: Match: diff ${GEN_DATA_DIR}/${RELENG_IMG}.iso ${GEN_DATA_DIR}/${RELENG_IMG}.new"
;; ;;
*) *)
echo -e "${SELF}: FAIL: diff returned code: $DIFF_RET\n" echo -e "FAIL : ${SELF} : diff returned code: $DIFF_RET\n"
;; ;;
esac esac