forked from chef/win32-service
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
97 lines (82 loc) · 2.16 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
require "bundler/gem_tasks"
require "rake"
require "rake/clean"
require "rake/testtask"
require "rbconfig"
require_relative "tasks/rspec"
include RbConfig
CLEAN.include(
"**/*.gem", # Gem files
"**/*.rbc" # Rubinius
)
namespace :example do
desc "Run the services example program."
task :services do
sh "ruby -Ilib examples/demo_services.rb"
end
end
namespace "test" do
desc "Run all tests for the win32-service library"
Rake::TestTask.new("all") do |t|
t.verbose = true
t.warning = true
end
desc "Run the tests for the Win32::Daemon class"
Rake::TestTask.new("daemon") do |t|
task :daemon
t.verbose = true
t.warning = true
t.test_files = FileList["test/test_win32_daemon.rb"]
end
namespace "service" do
desc "Run the tests for the Win32::Service class"
Rake::TestTask.new("all") do |t|
t.verbose = true
t.warning = true
t.test_files = FileList["test/test_win32_service*.rb"]
end
Rake::TestTask.new("configure") do |t|
t.verbose = true
t.warning = true
t.test_files = FileList["test/test_win32_service_configure.rb"]
end
Rake::TestTask.new("control") do |t|
t.verbose = true
t.warning = true
t.test_files = FileList["test/test_win32_service.rb"]
end
Rake::TestTask.new("create") do |t|
t.verbose = true
t.warning = true
t.test_files = FileList["test/test_win32_service_create.rb"]
end
Rake::TestTask.new("info") do |t|
t.verbose = true
t.warning = true
t.test_files = FileList["test/test_win32_service_info.rb"]
end
Rake::TestTask.new("status") do |t|
t.verbose = true
t.warning = true
t.test_files = FileList["test/test_win32_service_status.rb"]
end
Rake::TestTask.new("close_service_handle") do |t|
t.verbose = true
t.warning = true
t.test_files = FileList["test/test_win32_service_close_service_handle.rb"]
end
end
task :all do
Rake.application[:clean].execute
end
task :daemon do
Rake.application[:clean].execute
end
end
task :console do
require "irb"
require "irb/completion"
ARGV.clear
IRB.start
end
task default: "test:all"