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
2b341845
Commit
2b341845
authored
May 29, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
d3bef22e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
wcfs/δbtail_test.go
wcfs/δbtail_test.go
+13
-4
No files found.
wcfs/δbtail_test.go
View file @
2b341845
...
...
@@ -42,8 +42,8 @@ import (
type
TreeGen
struct
{
zurl
string
pysrv
*
exec
.
Cmd
// spawned `treegen trees`
pyin
*
io
.
PipeWrit
er
// input to pysrv
pyoutRaw
*
io
.
PipeReader
// output from pysrv
pyin
io
.
WriteClos
er
// input to pysrv
pyoutRaw
io
.
ReadCloser
// output from pysrv
pyout
*
bufio
.
Reader
// buffered ^^^
treeRoot
zodb
.
Oid
// oid of the tree treegen works on
head
zodb
.
Tid
// last made commit
...
...
@@ -56,8 +56,14 @@ func StartTreeGen(zurl string) (_ *TreeGen, err error) {
// spawn `treegen trees`
tg
:=
&
TreeGen
{
zurl
:
zurl
}
tg
.
pysrv
=
exec
.
Command
(
"./testprog/treegen.py"
,
"trees"
)
tg
.
pysrv
.
Stdin
,
tg
.
pyin
=
io
.
Pipe
()
tg
.
pyoutRaw
,
tg
.
pysrv
.
Stdout
=
io
.
Pipe
()
tg
.
pyin
,
err
=
tg
.
pysrv
.
StdinPipe
()
if
err
!=
nil
{
return
nil
,
err
}
tg
.
pyoutRaw
,
err
=
tg
.
pysrv
.
StdoutPipe
()
if
err
!=
nil
{
return
nil
,
err
}
tg
.
pyout
=
bufio
.
NewReader
(
tg
.
pyoutRaw
)
tg
.
pysrv
.
Stderr
=
os
.
Stderr
// no redirection
...
...
@@ -75,6 +81,9 @@ func StartTreeGen(zurl string) (_ *TreeGen, err error) {
defer
xerr
.
Context
(
&
err
,
"handshake"
)
start
,
err
:=
tg
.
pyout
.
ReadString
(
'\n'
)
if
err
!=
nil
{
if
err
==
io
.
EOF
{
err
=
io
.
ErrUnexpectedEOF
}
return
nil
,
err
}
defer
xerr
.
Context
(
&
err
,
"invalid start %q"
)
...
...
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