Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Joshua
wendelin.core
Commits
e8aeb5d2
Commit
e8aeb5d2
authored
Jun 10, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
daa44019
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
4 deletions
+31
-4
wcfs/wcfs_test.py
wcfs/wcfs_test.py
+31
-4
No files found.
wcfs/wcfs_test.py
View file @
e8aeb5d2
...
...
@@ -1211,6 +1211,7 @@ def test_wcfs():
wl.close()
"""
# XXX move before setup watch?
print
(
'
\
n
\
n
\
n
\
n
WATCH+COMMIT
\
n
\
n
\
n
\
n
'
)
# watched + commit -> read -> receive pin messages; read is stuck until pins are acknowledged
...
...
@@ -1221,6 +1222,10 @@ def test_wcfs():
at4
=
t
.
commit
()
f
.
assertCache
([
1
,
1
,
0
,
1
,
0
,
0
])
# FIXME a must be invalidated - see δbtree ^^^
t
.
dump_history
()
return
f
.
assertBlk
(
0
,
''
,
{
wl
:
{}})
# XXX 0, {0, at3} after δbtree works
f
.
assertBlk
(
1
,
''
,
{
wl
:
{}})
f
.
assertBlk
(
2
,
'4c'
,
{
wl
:
{
2
:
at3
}})
...
...
@@ -1230,12 +1235,11 @@ def test_wcfs():
f
.
assertBlk
(
5
,
'4f'
,
{
wl
:
{
5
:
at0
}})
# XXX at0 -> ø XXX also triggers access to #4 ?
# XXX watch "-" -> watch no longer notified
# XXX close -> watch no longer notified
# XXX wlink close -> watch no longer notified
# XXX watch with at="-" -> stop watching
# XXX watch for 2 files via single watch open
# XXX watch with at="-" -> watch no longer notified
# XXX 2 (or more) opened watch for 1 file at the same time
# XXX watch for 2 files via single watch open
wl
.
close
()
...
...
@@ -1310,3 +1314,26 @@ def test_tidtime_notrough():
for
i
in
range
(
10
):
at
=
t
.
commit
()
assert
tidtime
(
at
)
>
tidtime
(
atprev
)
# dump_history prints change history in tabular form.
# the output is useful to get overview of how file(s) are changed in tests.
@
func
(
tDB
)
def
dump_history
(
t
):
print
(
'>>> Change history by file:
\
n
'
)
for
zf
in
t
.
zfiles
():
print
(
'f<%s>:'
%
h
(
zf
.
_p_oid
))
for
dF
in
t
.
dFtail
:
df
=
dF
.
byfile
.
get
(
zf
)
emitv
=
[]
if
df
is
not
None
:
dblk
=
set
(
df
.
ddata
.
keys
())
for
blk
in
range
(
max
(
dblk
)
+
1
):
if
blk
in
dblk
:
emitv
.
append
(
'%d'
%
blk
)
else
:
emitv
.
append
(
' '
)
print
(
'
\
t
%s
\
t
%s'
%
(
t
.
hat
(
dF
.
rev
),
' '
.
join
(
emitv
)))
print
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment