]> git.saurik.com Git - redis.git/blame - tests/support/tmpfile.tcl
dump/restore fixed to use the new crc64 API.
[redis.git] / tests / support / tmpfile.tcl
CommitLineData
98578b57 1set ::tmpcounter 0
ab72b483 2set ::tmproot "./tests/tmp"
98578b57
PN
3file mkdir $::tmproot
4
5# returns a dirname unique to this process to write to
6proc tmpdir {basename} {
13566085 7 set dir [file join $::tmproot $basename.[pid].[incr ::tmpcounter]]
98578b57
PN
8 file mkdir $dir
9 set _ $dir
10}
11
12# return a filename unique to this process to write to
13proc tmpfile {basename} {
14 file join $::tmproot $basename.[pid].[incr ::tmpcounter]
15}