mirror of https://github.com/borgbackup/borg.git
testsuite: archiver: skip block device in test_transfer_upgrade
On MINGW, the S_IFBLK macro is incorrectly set as 0x3000 instead of 0x6000. https://github.com/mingw-w64/mingw-w64/blob/v10.0.0/mingw-w64-headers/crt/sys/stat.h#L133
This commit is contained in:
parent
66a407ff9f
commit
cf61e7d58a
|
@ -7,6 +7,7 @@ import unittest
|
||||||
|
|
||||||
from ...constants import * # NOQA
|
from ...constants import * # NOQA
|
||||||
from ...helpers.time import parse_timestamp
|
from ...helpers.time import parse_timestamp
|
||||||
|
from ..platform import is_win32
|
||||||
from . import ArchiverTestCaseBase, RemoteArchiverTestCaseBase, ArchiverTestCaseBinaryBase, RK_ENCRYPTION, BORG_EXES
|
from . import ArchiverTestCaseBase, RemoteArchiverTestCaseBase, ArchiverTestCaseBinaryBase, RK_ENCRYPTION, BORG_EXES
|
||||||
|
|
||||||
|
|
||||||
|
@ -151,6 +152,11 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
# Note: size == 0 for all items without a size or chunks list (like e.g. directories)
|
# Note: size == 0 for all items without a size or chunks list (like e.g. directories)
|
||||||
# Note: healthy == True indicates the *absence* of the additional chunks_healthy list
|
# Note: healthy == True indicates the *absence* of the additional chunks_healthy list
|
||||||
del g["hlid"]
|
del g["hlid"]
|
||||||
|
|
||||||
|
if e["type"] == "b" and is_win32:
|
||||||
|
# The S_IFBLK macro is broken on MINGW
|
||||||
|
del e["type"], g["type"]
|
||||||
|
del e["mode"], g["mode"]
|
||||||
assert g == e
|
assert g == e
|
||||||
|
|
||||||
if name == "archive1":
|
if name == "archive1":
|
||||||
|
@ -250,6 +256,8 @@ class ArchiverTestCase(ArchiverTestCaseBase):
|
||||||
assert item.group in ("root", "wheel")
|
assert item.group in ("root", "wheel")
|
||||||
assert "hlid" not in item
|
assert "hlid" not in item
|
||||||
elif item.path.endswith("bdev_12_34"):
|
elif item.path.endswith("bdev_12_34"):
|
||||||
|
if not is_win32:
|
||||||
|
# The S_IFBLK macro is broken on MINGW
|
||||||
assert stat.S_ISBLK(item.mode)
|
assert stat.S_ISBLK(item.mode)
|
||||||
# looks like we can't use os.major/minor with data coming from another platform,
|
# looks like we can't use os.major/minor with data coming from another platform,
|
||||||
# thus we only do a rather rough check here:
|
# thus we only do a rather rough check here:
|
||||||
|
|
Loading…
Reference in New Issue