forked from AppScale/gts
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Rakefile
123 lines (81 loc) · 2.3 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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
require 'rubygems'
require 'rake'
require 'rake/rdoctask'
require 'rake/testtask'
namespace :appcontroller do
APPCONTROLLER_TEST_SUITE = "AppController/test/ts_all.rb"
desc "Generates AppController rdoc"
Rake::RDocTask.new(:doc) { |rd|
rd.rdoc_files.include("AppController/djinn.rb",
"AppController/djinnServer.rb", "AppController/lib")
rd.rdoc_dir = "AppController/doc"
}
desc "Runs AppController unit tests"
Rake::TestTask.new("test") do |t|
t.pattern = APPCONTROLLER_TEST_SUITE
t.verbose = true
t.warning = false
end
end
namespace :python do
task :test do
sh "bash ts_python.sh"
end
end
namespace :appmanager do
task :test do
sh "nosetests AppManager/test/unit"
end
end
namespace :infrastructuremanager do
task :test do
sh "nosetests InfrastructureManager"
end
end
namespace :appdb do
task :test do
sh "nosetests AppDB/test/unit"
end
end
namespace :apptaskqueue do
task :test do
sh "nosetests AppTaskQueue/test/unit"
end
end
namespace :appserver do
task :test do
sh "nosetests AppServer/google/appengine/api/taskqueue/test " +
"AppServer/google/appengine/api/xmpp/test"
end
end
namespace :lib do
task :test do
sh "nosetests lib/test/unit"
end
end
namespace :appdashboard do
task :test do
sh "python AppDashboard/test/unit/test_suite.py"
end
task :coverage do |test|
sh "rm -rf AppDashboard/coverage"
sh "coverage erase"
sh "coverage run --include='AppDashboard/lib/*,AppDashboard/dashboard.py' --omit='*tests*' AppDashboard/test/test_suite.py"
sh "coverage report -m"
sh "coverage html --directory=AppDashboard/coverage"
end
end
namespace :xmppreceiver do
task :coverage do
sh "rm -rf XMPPReceiver/coverage"
sh "cd XMPPReceiver && coverage -e"
sh "cd XMPPReceiver && coverage run --include='xmpp_receiver.py' --omit='*tests*' --omit='*Python*' test/test_suite.py"
sh "cd XMPPReceiver && coverage report -m"
sh "cd XMPPReceiver && coverage html"
sh "cd XMPPReceiver && mv htmlcov coverage"
end
task :test do
sh "nosetests XMPPReceiver"
end
end
task :default => ['appcontroller:test', 'infrastructuremanager:test', 'appmanager:test', 'appdb:test', 'apptaskqueue:test', 'lib:test', 'appserver:test', 'xmppreceiver:test', 'appdashboard:test']