Reacting on xorriso ifailure in pipe test of releng/auto_isocontent
This commit is contained in:
parent
3b8f7c7007
commit
d37ba92a71
@ -139,8 +139,12 @@ All general options are accepted.
|
||||
Exercises inclusion of xorriso/xorriso.h and libisoburn/libisoburn.h
|
||||
in C++ programs and linking of the libraries. It might be necessary
|
||||
to set compiler options by shell variable CFLAGS before running the test.
|
||||
It might be necessary to hand over the install directory of libburn and
|
||||
libisofs in shell variable LD_LIBRARY_PATH.
|
||||
E.g. if on FreeBSD the include headers libisofs.h , libburn.h are not found:
|
||||
export CFLAGS="-I/usr/local/include"
|
||||
E.g. on GNU/Hurd, where libburn and libisofs are not found by the linker:
|
||||
export LD_LIBRARY_PATH="/usr/local/lib"
|
||||
|
||||
./auto_isocontent -x ../xorriso/xorriso
|
||||
Tests whether xorriso is able to record and restore two familes of
|
||||
|
@ -94,6 +94,20 @@ is_valid_iso9660() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Retrieve and evaluate return value of command run under return_wrapper
|
||||
check_xorriso_return() {
|
||||
ret=$(cat "$return_value_file")
|
||||
rm "$return_value_file"
|
||||
if test "$ret" = 0
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
failure=1
|
||||
echo
|
||||
echo "FAIL : ${SELF} : xorriso run exited with value $ret"
|
||||
return 1
|
||||
}
|
||||
|
||||
# Create test file and find out whether ACLs and/or xattr are available.
|
||||
#
|
||||
# Users known on GNU/Linux and FreeBSD: root games daemon man
|
||||
@ -198,14 +212,19 @@ echo
|
||||
ls -l "$on_disk"/*
|
||||
|
||||
echo -e "\n${SELF}: Producing simple image via -o" >&2
|
||||
"$xorriso" -as mkisofs "$on_disk" -o "$workdir"/image_minus_o.iso
|
||||
"$xorriso" -as mkisofs "$on_disk" -o "$workdir"/image_minus_o.iso
|
||||
is_valid_iso9660 "$workdir"/image_minus_o.iso
|
||||
|
||||
echo -e "\n${SELF}: Producing simple image via redirect" >&2
|
||||
"$xorriso" -as mkisofs "$on_disk" > "$workdir"/image_redirected.iso
|
||||
is_valid_iso9660 "$workdir"/image_redirected.iso
|
||||
|
||||
echo -e "\n${SELF}: Producing simple image via pipe" >&2
|
||||
"$xorriso" -as mkisofs "$on_disk" | cat > "$workdir"/image_piped.iso
|
||||
return_wrapper "$xorriso" -as mkisofs "$on_disk" | \
|
||||
cat > "$workdir"/image_piped.iso
|
||||
check_xorriso_return
|
||||
is_valid_iso9660 "$workdir"/image_piped.iso
|
||||
|
||||
echo -e "\n${SELF}: Producing simple image with for_backup/update_r/hardlinks" >&2
|
||||
"$xorriso" \
|
||||
$report_about \
|
||||
|
@ -119,6 +119,20 @@ check_for_xorriso() {
|
||||
}
|
||||
|
||||
|
||||
#############################################
|
||||
|
||||
# To catch the exit value of a command in a pipe
|
||||
return_value_file="$GEN_DATA_DIR"/wrapper_"$$"_return_value
|
||||
return_wrapper()
|
||||
{
|
||||
cmd="$1"
|
||||
shift 1
|
||||
"$cmd" "$@"
|
||||
RET="$?"
|
||||
echo "$RET" >"$return_value_file"
|
||||
return "$RET"
|
||||
}
|
||||
|
||||
#############################################
|
||||
|
||||
next_is=
|
||||
|
Loading…
Reference in New Issue
Block a user