Let releng burn test tolerate vanished udev link and wait for its re-appearance
This commit is contained in:
parent
a92aa1f8a0
commit
f7be37a1ef
@ -28,6 +28,33 @@ Overview:
|
||||
HLP
|
||||
}
|
||||
|
||||
wait_for_dev () {
|
||||
# $1 = device address
|
||||
timeout=30
|
||||
counter=0
|
||||
|
||||
while test "$counter" -lt "$timeout"
|
||||
do
|
||||
if test -e "$1"
|
||||
then
|
||||
echo
|
||||
return 0
|
||||
fi
|
||||
if test "$counter" = 0
|
||||
then
|
||||
echo
|
||||
echo "Not existing: $dev"
|
||||
echo "Will wait up to $timeout seconds for it to appear."
|
||||
echo "Consider to eject and reload it."
|
||||
fi
|
||||
counter=$(expr $counter + 1)
|
||||
echo -n "$counter "
|
||||
sleep 1
|
||||
done
|
||||
echo
|
||||
return 1
|
||||
}
|
||||
|
||||
getopts_inc=inc/releng_getopts.inc
|
||||
if test -e "$getopts_inc"
|
||||
then
|
||||
@ -132,6 +159,7 @@ fi
|
||||
|
||||
# Inspect media
|
||||
set +e
|
||||
wait_for_dev "$dev"
|
||||
res=$(${priv_cmd} "$RELENG_XORRISO" -outdev "$dev" 2>&1)
|
||||
ret=$?
|
||||
set -e
|
||||
@ -172,6 +200,7 @@ fi
|
||||
# Perform burn run
|
||||
echo ${priv_cmd} "$RELENG_XORRISO" -for_backup -outdev "$dev" -blank as_needed -map "$what" /test
|
||||
set +e
|
||||
wait_for_dev "$dev"
|
||||
${priv_cmd} "$RELENG_XORRISO" \
|
||||
-for_backup \
|
||||
-outdev "$dev" \
|
||||
@ -205,6 +234,7 @@ fi
|
||||
echo ${priv_cmd} "$RELENG_XORRISO" -for_backup -indev "$dev" \
|
||||
-check_media event=FATAL -- \ -check_md5_r FATAL / --
|
||||
set +e
|
||||
wait_for_dev "$dev"
|
||||
${priv_cmd} "$RELENG_XORRISO" \
|
||||
-for_backup \
|
||||
-indev "$dev" \
|
||||
|
@ -1 +1 @@
|
||||
#define Xorriso_timestamP "2011.09.23.131734"
|
||||
#define Xorriso_timestamP "2011.09.23.135519"
|
||||
|
Loading…
Reference in New Issue
Block a user