From d32661979bdc7002b5d34e5b4b235f1bc8748537 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Fri, 5 Aug 2011 15:43:58 +0000 Subject: [PATCH] Made existing tests comply to upcomming prescriptions for failure messages --- libisoburn/trunk/releng/auto_cxx | 2 +- libisoburn/trunk/releng/auto_isocontent | 18 +++++++++--------- libisoburn/trunk/releng/manual_burn | 16 ++++++++-------- libisoburn/trunk/releng/manual_isojigdo | 6 +++--- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/libisoburn/trunk/releng/auto_cxx b/libisoburn/trunk/releng/auto_cxx index 5e40adf2..c66ab6a7 100755 --- a/libisoburn/trunk/releng/auto_cxx +++ b/libisoburn/trunk/releng/auto_cxx @@ -58,7 +58,7 @@ fi if [ ${RET_CPL} == 0 -a -f ${SMPL}.obj ]; then mv ${SMPL}.obj ${GEN_DATA_DIR} else - printf "\n${SELF}: FAIL Compilation of ${SMPL}\n" + printf "\nFAIL : ${SELF}: Compilation of ${SMPL}\n" cleanup exit 7 fi diff --git a/libisoburn/trunk/releng/auto_isocontent b/libisoburn/trunk/releng/auto_isocontent index c7abd527..8935a61b 100755 --- a/libisoburn/trunk/releng/auto_isocontent +++ b/libisoburn/trunk/releng/auto_isocontent @@ -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 diff --git a/libisoburn/trunk/releng/manual_burn b/libisoburn/trunk/releng/manual_burn index 81e416be..d658a793 100755 --- a/libisoburn/trunk/releng/manual_burn +++ b/libisoburn/trunk/releng/manual_burn @@ -102,7 +102,7 @@ if test -e "$dev" then if test "$any_media" = 1 -a -f "$dev" then - echo "FAIL: ${SELF} : --dev $dev leads to an existing regular file" + echo "FAIL : ${SELF} : --dev $dev leads to an existing regular file" echo cleanup exit 31 @@ -110,7 +110,7 @@ then else if test "$any_media" = "0" 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 cleanup exit 31 @@ -125,7 +125,7 @@ set -e if test "$ret" -ne 0 then 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 cleanup exit 1 @@ -141,7 +141,7 @@ then echo "Recognized as re-usable." elif test "$media" = "is not recognizable" then - echo "FAIL: ${SELF} : No recognizable media detected in: '$dev'" + echo "FAIL : ${SELF} : No recognizable media detected in: '$dev'" echo cleanup exit 2 @@ -149,7 +149,7 @@ then then echo "Accepted media only because of option --any_media : '$media'" else - echo "FAIL: ${SELF} : No re-usable media detected, but: '$media'" + echo "FAIL : ${SELF} : No re-usable media detected, but: '$media'" echo cleanup exit 2 @@ -168,7 +168,7 @@ ret=$? set -e if test "$ret" -ne 0 then - echo "FAIL: ${SELF} : Non-zero exit value with burn run: $ret" + echo "FAIL : ${SELF} : Non-zero exit value with burn run: $ret" echo cleanup exit 1 @@ -176,7 +176,7 @@ fi if test "$SIMULATE_FAILURE" = 1 then - echo "FAIL: ${SELF} : Simulated failure caused by option -f" + echo "FAIL : ${SELF} : Simulated failure caused by option -f" if test -f "$dev" then # Alter image @@ -202,7 +202,7 @@ ret=$? set -e if test "$ret" -ne 0 then - echo "FAIL: ${SELF} : Non-zero exit value with checkread run: $ret" + echo "FAIL : ${SELF} : Non-zero exit value with checkread run: $ret" echo cleanup exit 1 diff --git a/libisoburn/trunk/releng/manual_isojigdo b/libisoburn/trunk/releng/manual_isojigdo index 4d7796ac..2162d263 100755 --- a/libisoburn/trunk/releng/manual_isojigdo +++ b/libisoburn/trunk/releng/manual_isojigdo @@ -78,7 +78,7 @@ case ${RETCODE_VER_JTE} in 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}: http://www.einval.com/~steve/software/JTE/\n" 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}: FAIL: wget returned code: $WGET_RET\n" + echo -e "\nFAIL : ${SELF} : wget returned code: $WGET_RET\n" cleanup 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}: FAIL: diff returned code: $DIFF_RET\n" + echo -e "FAIL : ${SELF} : diff returned code: $DIFF_RET\n" ;; esac