Commit dac4dbb0 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent f280a3b7
...@@ -26,6 +26,9 @@ from wendelin.bigfile.file_zodb import ZBlk0, ZBlk1, ZBigFile ...@@ -26,6 +26,9 @@ from wendelin.bigfile.file_zodb import ZBlk0, ZBlk1, ZBigFile
from numpy import arange from numpy import arange
import os, os.path, transaction 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 blksize = 2*1024*1024 # XXX hardcoded
blksize32 = blksize // 4 blksize32 = blksize // 4
...@@ -34,8 +37,9 @@ def rm_f(path): ...@@ -34,8 +37,9 @@ def rm_f(path):
os.remove(path) os.remove(path)
def main(): def main():
import zodbtools.test.gen_testdata # to make time predictable (XXX) run_with_zodb3py2_compat(main2)
def main2():
outfs = "testdata/zblk.fs" outfs = "testdata/zblk.fs"
rm_f(outfs) rm_f(outfs)
rm_f(outfs + ".index") rm_f(outfs + ".index")
...@@ -64,13 +68,14 @@ def main(): ...@@ -64,13 +68,14 @@ def main():
print >>f, v print >>f, v
emit("// Code generated by %s; DO NOT EDIT." % __file__) emit("// Code generated by %s; DO NOT EDIT." % __file__)
emit("package main\n") emit("package main\n")
emit('import "lab.nexedi.com/kirr/neo/go/zodb"\n')
emit("const blksize = %s" % blksize) emit("const blksize = %s" % blksize)
emit("const z0_oid = %s" % u64(z0._p_oid)) 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_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 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() conn.close()
......
// Code generated by ./testdata/zblk_test_gen.py; DO NOT EDIT. // Code generated by ./testdata/zblk_test_gen.py; DO NOT EDIT.
package main package main
import "lab.nexedi.com/kirr/neo/go/zodb"
const blksize = 2097152 const blksize = 2097152
const z0_oid = 2 const z0_oid = 2
const z1_oid = 3 const z1_oid = 3
const zf_oid = 1 const zf_oid = 1
const z0_rev = zodb.Tid(0x285cbac3851eb99)
const z1_rev = zodb.Tid(0x285cbac3851eb99)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment