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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
2be847c4
Commit
2be847c4
authored
Nov 03, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f118617b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
conftest.py
conftest.py
+9
-4
No files found.
conftest.py
View file @
2be847c4
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
from
__future__
import
print_function
,
absolute_import
from
__future__
import
print_function
,
absolute_import
from
golang
import
func
,
defer
from
golang
import
func
,
defer
from
functools
import
partial
# Before pytest exits, teardown WCFS(s) that we automatically spawned during
# Before pytest exits, teardown WCFS(s) that we automatically spawned during
# test runs in bigfile/bigarray/...
# test runs in bigfile/bigarray/...
...
@@ -30,16 +31,20 @@ from golang import func, defer
...
@@ -30,16 +31,20 @@ from golang import func, defer
@
func
@
func
def
pytest_unconfigure
(
config
):
def
pytest_unconfigure
(
config
):
from
wendelin
import
wcfs
from
wendelin
import
wcfs
from
wendelin.wcfs.wcfs_test
import
tWCFS
print
(
"
\
n
\
n
spawned WCFS:"
)
print
(
"
\
n
\
n
spawned WCFS:"
)
print
(
wcfs
.
_wcstarted
)
print
(
wcfs
.
_wcstarted
)
print
(
"closing..."
)
for
wc
in
wcfs
.
_wcstarted
:
for
wc
in
wcfs
.
_wcstarted
:
if
wc
.
_proc
.
poll
()
is
not
None
:
if
wc
.
_proc
.
poll
()
is
not
None
:
continue
# this wcfs server already exited
continue
# this wcfs server already exited
twc
=
tWCFS
(
wc
=
wc
)
# FIXME currently has to kill wcfs.go, because swapned pinner threads are running
# FIXME currently has to kill wcfs.go, because swapned pinner threads are running
# -> stop pinner first
# -> stop pinner first
# NOTE: defer instead of direct call - to call all wc.close if there was multiple wc spawned
# NOTE: defer instead of direct call - to call all wc.close if there was multiple wc spawned
defer
(
twc
.
close
)
defer
(
partial
(
_wcclose
,
wc
))
def
_wcclose
(
wc
):
from
wendelin.wcfs.wcfs_test
import
tWCFS
print
(
"(unmount/stop wcfs pid%d @ %s)"
%
(
wc
.
_proc
.
pid
,
wc
.
mountpoint
))
twc
=
tWCFS
(
wc
=
wc
)
twc
.
close
()
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