Made existing tests comply to upcomming prescriptions for failure messages

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

View File

@ -63,7 +63,7 @@ test -z "$in_iso" && in_iso="$on_disk"
mkdir "$on_disk" || bad=1
if test "$bad" = 1
then
echo -e "\n${SELF}: FAIL : Test environment error : Cannot make directories"
echo -e "\nFAIL : ${SELF} : Test environment error : Cannot make directories"
exit 3
fi
@ -81,13 +81,13 @@ is_valid_iso9660() {
ISOfile="$1"
if [ ! -f ${ISOfile} ]; then
failure=1
printf "\n${SELF}: FAIL : Not found: ${ISOfile}\n"
printf "\nFAIL : ${SELF} : Not found: ${ISOfile}\n"
fi
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"
else
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
}
@ -140,10 +140,10 @@ then
failure=1
echo >&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
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
echo -e "\n${SELF}: Copying from image to temporary disk tree" >&2
@ -167,7 +167,7 @@ fi
if test "$simulate_failure" = 1
then
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
fi
@ -176,8 +176,8 @@ printf "\n${SELF}: Comparing original disk tree and temporary one..." >&2
diff -r "$on_disk" "$copy_on_disk"
if test "$?" -ne 0
then
echo -e "\n${SELF}: FAIL : 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 $on_disk $copy_on_disk reports differences" >&2
echo -e "\nFAIL : ${SELF} : diff -r reports differences"
failure=1
else
printf "OK" >&2
@ -191,7 +191,7 @@ if test x"$x" = x"$expected"
then
printf "\n${SELF}: Checking for hardlinks being siblings. Done. OK.\n" >&2
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}: Got : $x\n" >&2
failure=1