mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-06-26 02:41:54 +00:00
Ignore directory mtimes when testing
They are flaky on CI for some reason
This commit is contained in:
parent
d718ab6edf
commit
bb897fa299
1 changed files with 5 additions and 1 deletions
|
|
@ -4,6 +4,7 @@
|
|||
|
||||
import os
|
||||
import shutil
|
||||
import stat
|
||||
import tempfile
|
||||
from collections import namedtuple
|
||||
from contextlib import contextmanager
|
||||
|
|
@ -389,7 +390,10 @@ class TestFileTransmission(BaseTest):
|
|||
|
||||
def entry(path, base=src):
|
||||
st = os.stat(path, follow_symlinks=False)
|
||||
return Entry(os.path.relpath(path, base), st.st_mtime_ns, st.st_mode, st.st_nlink)
|
||||
mtime = st.st_mtime_ns
|
||||
if stat.S_ISDIR(st.st_mode):
|
||||
mtime = 0 # mtime is flaky for dirs on CI even empty ones
|
||||
return Entry(os.path.relpath(path, base), mtime, st.st_mode, st.st_nlink)
|
||||
|
||||
def se(path):
|
||||
e = entry(path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue