regtests: more fixes for Windows

This commit is contained in:
Stéphane Lesimple
2020-08-25 14:28:15 +02:00
parent d8e0dab436
commit 8298d78e04
3 changed files with 33 additions and 4 deletions

View File

@@ -67,7 +67,6 @@ case "${param[0]}" in
doall="yes"
;;
cont)
doall="yes"
cont_at="${param[1]}"
;;
esac
@@ -104,8 +103,8 @@ function file_exists()
function try()
{ 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
doit=$(grep "${CODEC_PREFIX}_$2" "$CONFIGFILE_WIN")
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")
fi
if test -z "$doit"; then
@@ -217,6 +216,10 @@ function run_regtest()
filter=cat
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
printf "%b\r%b\n" "BAD; diffs found (<expected; >created):" "[\e[31m✘\e[0m]"

26
regtests/config-win.txt Normal file
View 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

View File

@@ -264,7 +264,7 @@ DeviceHandle* OpenDevice(char *device)
dh = open_spti_device(Closure->device);
if(!dh)
{ Stop(_("\nCould not open device %s."), device);
{ Stop(_("Could not open device %s."), device);
return NULL;
}
}