1
0
mirror of https://github.com/fluencelabs/redis synced 2025-06-28 16:31:33 +00:00
Files
client-libraries
deps
design-documents
doc
src
tests
assets
integration
support
redis.tcl
server.tcl
test.tcl
tmpfile.tcl
util.tcl
tmp
unit
test_helper.tcl
utils
.gitignore
BUGS
CONTRIBUTING
COPYING
Changelog
INSTALL
Makefile
README
TODO
redis.conf
redis/tests/support/tmpfile.tcl

16 lines
403 B
Tcl
Raw Normal View History

set ::tmpcounter 0
set ::tmproot "./tests/tmp"
file mkdir $::tmproot
# returns a dirname unique to this process to write to
proc tmpdir {basename} {
set dir [file join $::tmproot $basename.[pid].[incr ::tmpcounter]]
file mkdir $dir
set _ $dir
}
# return a filename unique to this process to write to
proc tmpfile {basename} {
file join $::tmproot $basename.[pid].[incr ::tmpcounter]
}