Debian Codegraph @

vendor/groonga-log-source/test/run-test.rb

raw
1 #!/usr/bin/env ruby
2 #
3 # Copyright (C) 2012-2013 Kouhei Sutou <[email protected]>
4 #
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License, or (at your option) any later version.
9 #
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
14 #
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18
19 $VERBOSE = true
20
21 require "pathname"
22
23 base_dir = Pathname.new(__FILE__).dirname.parent.expand_path
24 top_dir = base_dir.parent
25
26 lib_dir = base_dir + "lib"
27 test_dir = base_dir + "test"
28
29 require "test-unit"
30 require "test/unit/notify"
31
32 Test::Unit::Priority.enable
33
34 $LOAD_PATH.unshift(lib_dir.to_s)
35
36 $LOAD_PATH.unshift(test_dir.to_s)
37 require "helper"
38
39 Dir.glob("#{base_dir}/test/**/test{_,-}*.rb") do |file|
40 require file.sub(/\.rb\z/, '')
41 end
42
43 ENV["TEST_UNIT_MAX_DIFF_TARGET_STRING_SIZE"] ||= "5000"
44
45 exit Test::Unit::AutoRunner.run