diff --git a/test/load/runner.rb b/test/load/runner.rb --- a/test/load/runner.rb +++ b/test/load/runner.rb @@ -20,6 +20,8 @@ require 'visitor_curl_cli' +TEMP_DIR = './tmp' + def show_usage puts < [ ] [ ] ... [options] @@ -31,6 +33,12 @@ USAGE end +def initialize_temp_dir + if !FileTest.exists? TEMP_DIR + Dir.mkdir TEMP_DIR + end +end + def runner(visitor_lists, load_time=60, options={}) visitors = [] vcount = 0 @@ -40,7 +48,7 @@ c = Kernel.const_get(cname) num.times do - visitors[vcount] = c.new(vcount+1) + visitors[vcount] = c.new(vcount+1, TEMP_DIR) visitors[vcount].talkative = true vcount += 1 end @@ -144,5 +152,6 @@ end end +initialize_temp_dir runner visitor_list, load_time, {:dry_run => dry_run}