Made existing tests comply to upcomming prescriptions for failure messages
This commit is contained in:
parent
cafec268c9
commit
d32661979b
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user