null+****@clear*****
null+****@clear*****
2012年 5月 16日 (水) 18:22:08 JST
HAYASHI Kentaro 2012-05-16 18:22:08 +0900 (Wed, 16 May 2012) New Revision: ef1b533eea1dc5d5902f2e2be9fb153963336dfd Log: test: add -d/--generate-filename-with-csv-data option Modified files: test/function/tools/geo/generate-grntest-data.rb Modified: test/function/tools/geo/generate-grntest-data.rb (+6 -1) =================================================================== --- test/function/tools/geo/generate-grntest-data.rb 2012-05-16 18:11:11 +0900 (98011b2) +++ test/function/tools/geo/generate-grntest-data.rb 2012-05-16 18:22:08 +0900 (800b782) @@ -287,6 +287,10 @@ if __FILE__ == $0 parser.on("-c CSV_FILE", "--csv CSV_FILE", "source CSV file") do |csv_file| OPTS[:csv] = csv_file end + parser.on("-d", "--generate-filename-with-csv-data", + "generate test file name with geo data") do |csv_data| + OPTS[:csv_data] = csv_data + end parser.on("-v", "--verbose", "show log in detail") do |verbose| OPTS[:verbose] = verbose end @@ -325,8 +329,9 @@ if __FILE__ == $0 puts(line) end # show new generated filename - #puts grndata.generate_new_data(line, prefix, quadrant, type, filename) puts("#{prefix}/#{quadrant}/#{type}/#{filename}") + elsif OPTS.has_key?(:csv_data) + puts grndata.generate_new_data(line, prefix, quadrant, type, filename) elsif OPTS.has_key?(:test) app_types.each do |app_type| file_prefix = ""