Option -fail for test_hardlinks to simulate failure, moved tmp to releng/tmp

master
Thomas Schmitt 12 years ago
parent bf6bcf6dda
commit e832ab8610
  1. 17
      releng/test_hardlinks

@ -14,6 +14,7 @@ export in_iso=""
export copy_on_disk="$workdir"/xorriso_hardlinks_copy_dir
export keep=0
export failure=0
export simulate_failure=0
export next_is_xorriso=0
export next_is_rc=0
export bad=0
@ -106,8 +107,11 @@ do
elif test x"$i" = x"-v"
then
report_about="-report_about ALL"
elif test x"$i" = x"-fail"
then
simulate_failure=1
else
echo "Usage: $0 [-rc FILE] [-keep] [-cleanup] [-xorriso PATH] [-v]" >&2
echo "Usage: $0 [-rc FILE] [-keep] [-cleanup] [-fail] [-xorriso PATH] [-v]" >&2
exit 2
fi
done
@ -191,8 +195,14 @@ echo "=== Copying from image to temporary disk tree" >&2
-extract "$in_iso" "$copy_on_disk"
## For testing the test: Let it fail deliberately
# rm "$copy_on_disk"/file_1_link_b
if test "$simulate_failure" = 1
then
echo "===" >&2
echo "=== SIMULATING FAILURE BY REMOVING AN EXTRACTED FILE" >&2
echo "===" >&2
echo "FAIL : $prog : Simulated failure caused by option -fail"
rm "$copy_on_disk"/file_1_link_b
fi
echo "=== Comparing original disk tree and temporary one" >&2
@ -230,6 +240,7 @@ echo
if test "$failure" = 1
then
echo "======== $prog :" 'FAILED'
echo
exit 1
else
echo "======== $prog :" "Passed"

Loading…
Cancel
Save