regtests: more fixes for Windows
This commit is contained in:
@@ -67,7 +67,6 @@ case "${param[0]}" in
|
|||||||
doall="yes"
|
doall="yes"
|
||||||
;;
|
;;
|
||||||
cont)
|
cont)
|
||||||
doall="yes"
|
|
||||||
cont_at="${param[1]}"
|
cont_at="${param[1]}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -104,8 +103,8 @@ function file_exists()
|
|||||||
|
|
||||||
function try()
|
function try()
|
||||||
{ local doit=$(grep "${CODEC_PREFIX}_$2 " $CONFIGFILE)
|
{ local doit=$(grep "${CODEC_PREFIX}_$2 " $CONFIGFILE)
|
||||||
if echo "$OS" | grep -q Windows && test -e "$CONFIGFILE_WIN" && grep -q "${CODEC_PREFIX}_$2" "$CONFIGFILE_WIN"; then
|
if echo "$OS" | grep -q Windows && test -e "$CONFIGFILE_WIN" && grep -q "${CODEC_PREFIX}_$2 " "$CONFIGFILE_WIN"; then
|
||||||
doit=$(grep "${CODEC_PREFIX}_$2" "$CONFIGFILE_WIN")
|
doit=$(grep "${CODEC_PREFIX}_$2 " "$CONFIGFILE_WIN")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "$doit"; then
|
if test -z "$doit"; then
|
||||||
@@ -217,6 +216,10 @@ function run_regtest()
|
|||||||
|
|
||||||
filter=cat
|
filter=cat
|
||||||
echo "$options" | grep -qw SORTED && filter=sort
|
echo "$options" | grep -qw SORTED && filter=sort
|
||||||
|
if [ "${CODEC_PREFIX}_${testsymbol}" = RS01_scan_no_device ]; then
|
||||||
|
# for Windows
|
||||||
|
sed -i -re "s=device $NON_EXISTENT_DEVICE\.=/dev/sdz: No such file or directory=" $NEWLOG
|
||||||
|
fi
|
||||||
|
|
||||||
if ! diff <(tail -n +3 $REFLOG | $filter) <(sed -re "s=${SED_REMOVE_ISO_DIR}==g" $NEWLOG | $filter) >${DIFFLOG}; then
|
if ! diff <(tail -n +3 $REFLOG | $filter) <(sed -re "s=${SED_REMOVE_ISO_DIR}==g" $NEWLOG | $filter) >${DIFFLOG}; then
|
||||||
printf "%b\r%b\n" "BAD; diffs found (<expected; >created):" "[\e[31m✘\e[0m]"
|
printf "%b\r%b\n" "BAD; diffs found (<expected; >created):" "[\e[31m✘\e[0m]"
|
||||||
|
|||||||
26
regtests/config-win.txt
Normal file
26
regtests/config-win.txt
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
RS01_ecc_no_read_perm no
|
||||||
|
RS01_ecc_no_write_perm no
|
||||||
|
RS01_fix_no_read_perm no
|
||||||
|
RS01_fix_no_read_perm_ecc no
|
||||||
|
RS01_fix_no_write_perm no
|
||||||
|
RS01_scan_with_no_permission_for_ecc no
|
||||||
|
RS01_read_with_no_permission_for_ecc no
|
||||||
|
RS01_adaptive_with_no_permission_for_ecc no
|
||||||
|
RS02_ecc_no_read_perm no
|
||||||
|
RS02_ecc_no_write_perm no
|
||||||
|
RS02_fix_no_read_perm no
|
||||||
|
RS02_fix_no_write_perm no
|
||||||
|
RS03i_ecc_no_read_perm no
|
||||||
|
RS03i_ecc_no_write_perm no
|
||||||
|
RS03i_fix_no_read_perm no
|
||||||
|
RS03i_fix_no_write_perm no
|
||||||
|
RS03f_ecc_no_read_perm no
|
||||||
|
RS03f_ecc_no_write_perm no
|
||||||
|
RS03f_fix_no_read_perm no
|
||||||
|
RS03f_fix_no_read_perm_ecc no
|
||||||
|
RS03f_fix_no_write_perm no
|
||||||
|
RS03f_fix_no_write_perm_ecc no
|
||||||
|
|
||||||
|
RS01_scan_no_device_access no
|
||||||
|
RS01_read_no_device_access no
|
||||||
|
RS01_adaptive_no_device_access no
|
||||||
@@ -264,7 +264,7 @@ DeviceHandle* OpenDevice(char *device)
|
|||||||
dh = open_spti_device(Closure->device);
|
dh = open_spti_device(Closure->device);
|
||||||
|
|
||||||
if(!dh)
|
if(!dh)
|
||||||
{ Stop(_("\nCould not open device %s."), device);
|
{ Stop(_("Could not open device %s."), device);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user