forked from rgnets/ruby-mosquitto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
46 lines (38 loc) · 1.05 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# encoding: utf-8
require 'rubygems' unless defined?(Gem)
require 'rake' unless defined?(Rake)
require 'rake/extensiontask'
require 'rake/testtask'
require 'yard'
YARD::Rake::YardocTask.new do |t|
t.files = ['README.md', 'lib/**/*.rb', "ext/mosquitto/*.c"]
end
Rake::ExtensionTask.new('mosquitto') do |ext|
ext.name = 'mosquitto_ext'
ext.ext_dir = 'ext/mosquitto'
CLEAN.include 'lib/**/mosquitto_ext.*'
end
namespace :test do
desc 'Run mosquitto tests'
Rake::TestTask.new(:unit) do |t|
t.test_files = Dir.glob("test/**/test_*.rb").reject{|t| t =~ /integration/ }
t.verbose = true
t.warning = true
end
desc 'Run mosquitto integration tests'
Rake::TestTask.new(:integration) do |t|
t.test_files = Dir.glob("test/test_integration.rb")
t.verbose = true
t.warning = true
end
end
namespace :debug do
desc "Run the test suite under gdb"
task :gdb do
system "gdb --args ruby rake"
end
end
task 'test:unit' => :compile
task 'test:integration' => :compile
task :test => ['test:unit', 'test:integration']
task :default => :test