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
dac4dbb0
Commit
dac4dbb0
authored
Apr 06, 2020
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f280a3b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
wcfs/testdata/zblk_test_gen.py
wcfs/testdata/zblk_test_gen.py
+8
-3
wcfs/ztestdata_zblk_test.go
wcfs/ztestdata_zblk_test.go
+4
-0
No files found.
wcfs/testdata/zblk_test_gen.py
View file @
dac4dbb0
...
...
@@ -26,6 +26,9 @@ from wendelin.bigfile.file_zodb import ZBlk0, ZBlk1, ZBigFile
from
numpy
import
arange
import
os
,
os
.
path
,
transaction
import
zodbtools.test.gen_testdata
# to make time predictable
from
zodbtools.test.gen_testdata
import
run_with_zodb3py2_compat
blksize
=
2
*
1024
*
1024
# XXX hardcoded
blksize32
=
blksize
//
4
...
...
@@ -34,8 +37,9 @@ def rm_f(path):
os
.
remove
(
path
)
def
main
():
import
zodbtools.test.gen_testdata
# to make time predictable (XXX
)
run_with_zodb3py2_compat
(
main2
)
def
main2
():
outfs
=
"testdata/zblk.fs"
rm_f
(
outfs
)
rm_f
(
outfs
+
".index"
)
...
...
@@ -64,13 +68,14 @@ def main():
print
>>
f
,
v
emit
(
"// Code generated by %s; DO NOT EDIT."
%
__file__
)
emit
(
"package main
\
n
"
)
emit
(
'import "lab.nexedi.com/kirr/neo/go/zodb"
\
n
'
)
emit
(
"const blksize = %s"
%
blksize
)
emit
(
"const z0_oid = %s"
%
u64
(
z0
.
_p_oid
))
emit
(
"const z0_rev = %s"
%
u64
(
z0
.
_p_serial
))
emit
(
"const z1_oid = %s"
%
u64
(
z1
.
_p_oid
))
emit
(
"const z1_rev = %s"
%
u64
(
z1
.
_p_serial
))
emit
(
"const zf_oid = %s"
%
u64
(
zf
.
_p_oid
))
emit
(
"const z0_rev = zodb.Tid(0x%x)"
%
u64
(
z0
.
_p_serial
))
emit
(
"const z1_rev = zodb.Tid(0x%x)"
%
u64
(
z1
.
_p_serial
))
conn
.
close
()
...
...
wcfs/ztestdata_zblk_test.go
View file @
dac4dbb0
// Code generated by ./testdata/zblk_test_gen.py; DO NOT EDIT.
package
main
import
"lab.nexedi.com/kirr/neo/go/zodb"
const
blksize
=
2097152
const
z0_oid
=
2
const
z1_oid
=
3
const
zf_oid
=
1
const
z0_rev
=
zodb
.
Tid
(
0x285cbac3851eb99
)
const
z1_rev
=
zodb
.
Tid
(
0x285cbac3851eb99
)
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