File: Rakefile

package info (click to toggle)
jruby 1.5.1-1
  • links: PTS, VCS
  • area: non-free
  • in suites: squeeze
  • size: 46,252 kB
  • ctags: 72,039
  • sloc: ruby: 398,155; java: 169,482; yacc: 3,782; xml: 2,469; ansic: 415; sh: 279; makefile: 78; tcl: 40
file content (391 lines) | stat: -rw-r--r-- 10,479 bytes parent folder | download | duplicates (4)
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
require 'rake'
require 'rake/testtask'

desc "Runs the test suite for the core classes"
Rake::TestTask.new('test_core') do |t|
   files = FileList['test/core/**/tc*']
   files.delete_if{ |f| File.basename(f) == 'tc_detach.rb' }
   t.test_files = files
   t.warning = true
end

desc "Runs the test suite for the Array class"
Rake::TestTask.new('test_array') do |t|
   files = FileList['test/core/Array/*/*.rb']
   t.test_files = files
   t.warning = true
end

desc "Runs the test suite for the Bignum class"
Rake::TestTask.new('test_bignum') do |t|
   t.test_files = FileList['test/core/Bignum/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Binding class"
Rake::TestTask.new('test_binding') do |t|
   t.test_files = FileList['test/core/Binding/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Class module"
Rake::TestTask.new('test_class') do |t|
   t.test_files = FileList['test/core/Class/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Comparable module"
Rake::TestTask.new('test_comparable') do |t|
   t.test_files = FileList['test/core/Comparable/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Dir class"
Rake::TestTask.new('test_dir') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/Dir/*/*.rb']
end

desc "Runs the test suite for the Enumerable class"
Rake::TestTask.new('test_enumerable') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/Enumerable/*/*.rb']
end

desc "Runs the test suite for the Errno class"
Rake::TestTask.new('test_errno') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/Errno/*/*.rb']
end

desc "Runs the test suite for the Exception class"
Rake::TestTask.new('test_exception') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/Exception/*/*.rb']
end

desc "Runs the test suite for the FalseClass class"
Rake::TestTask.new('test_false') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/FalseClass/*/*.rb']
end

desc "Runs the test suite for the File class"
Rake::TestTask.new('test_file') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/File/*/*.rb']
end

desc "Runs the test suite for the File::Stat class"
Rake::TestTask.new('test_file_stat') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/FileStat/*/*.rb']
end

desc "Runs the test suite for the Fixnum class"
Rake::TestTask.new('test_fixnum') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/Fixnum/*/*.rb']
end

desc "Runs the test suite for the Float class"
Rake::TestTask.new('test_float') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/Float/*/*.rb']
end

desc "Runs the test suite for the GC module"
Rake::TestTask.new('test_gc') do |t|
   t.test_files = FileList['test/core/GC/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Hash class"
Rake::TestTask.new('test_hash') do |t|
   t.test_files = FileList['test/core/Hash/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Integer class"
Rake::TestTask.new('test_integer') do |t|
   t.test_files = FileList['test/core/Integer/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the IO class"
Rake::TestTask.new('test_io') do |t|
   t.test_files = FileList['test/core/IO/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Kernel module"
Rake::TestTask.new('test_kernel') do |t|
   t.test_files = FileList['test/core/Kernel/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Marshal class"
Rake::TestTask.new('test_marshal') do |t|
   t.test_files = FileList['test/core/Marshal/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the MatchData class"
Rake::TestTask.new('test_matchdata') do |t|
   t.test_files = FileList['test/core/MatchData/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Math module"
Rake::TestTask.new('test_math') do |t|
   t.test_files = FileList['test/core/Math/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Method class"
Rake::TestTask.new('test_method') do |t|
   t.test_files = FileList['test/core/Method/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for miscellaneous variables and constants"
Rake::TestTask.new('test_misc') do |t|
   t.test_files = FileList['test/core/Misc/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Module object"
Rake::TestTask.new('test_module') do |t|
   t.test_files = FileList['test/core/Module/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the NilClass class"
Rake::TestTask.new('test_nil') do |t|
   t.test_files = FileList['test/core/NilClass/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Numeric class"
Rake::TestTask.new('test_numeric') do |t|
   t.test_files = FileList['test/core/Numeric/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Object class"
Rake::TestTask.new('test_object') do |t|
   t.test_files = FileList['test/core/Object/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the ObjectSpace class"
Rake::TestTask.new('test_objectspace') do |t|
   t.test_files = FileList['test/core/ObjectSpace/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Process module"
Rake::TestTask.new('test_process') do |t|
   t.test_files = FileList['test/core/Process/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Process::GID module"
Rake::TestTask.new('test_process_gid') do |t|
   t.test_files = FileList['test/core/ProcessGID/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Process::Sys module"
Rake::TestTask.new('test_process_sys') do |t|
   t.test_files = FileList['test/core/ProcessSys/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Process::UID module"
Rake::TestTask.new('test_process_uid') do |t|
   t.test_files = FileList['test/core/ProcessUID/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Range class"
Rake::TestTask.new('test_range') do |t|
   t.test_files = FileList['test/core/Range/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Regexp class"
Rake::TestTask.new('test_regexp') do |t|
   t.test_files = FileList['test/core/Regexp/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Signal class"
Rake::TestTask.new('test_signal') do |t|
   t.test_files = FileList['test/core/Signal/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the String class"
Rake::TestTask.new('test_string') do |t|
   t.test_files = FileList['test/core/String/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Struct class"
Rake::TestTask.new('test_struct') do |t|
   t.test_files = FileList['test/core/Struct/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Symbol class"
Rake::TestTask.new('test_symbol') do |t|
   t.test_files = FileList['test/core/Symbol/*/*.rb']
   t.warning = true
end

desc "Runs the test suite for the Thread class"
Rake::TestTask.new('test_thread') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/Thread/*/*.rb']
end

desc "Runs the test suite for the Time class"
Rake::TestTask.new('test_time') do |t|
   files = FileList['test/core/Time/*/*.rb']
   t.test_files = files
   t.warning = true
end

desc "Runs the test suite for the TrueClass class"
Rake::TestTask.new('test_true') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/TrueClass/*/*.rb']
end

desc "Runs the test suite for the UnboundMethod class"
Rake::TestTask.new('test_unbound_method') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/core/UnboundMethod/*/*.rb']
end

## Test tasks for the stdlib ##

desc "Run the test suite for all stdlib packages"
Rake::TestTask.new('test_stdlib') do |t|
   t.libs << 'lib'
   t.warning = true

   files = FileList['test/stdlib/*/*.rb']
   if RUBY_PLATFORM.match('mswin')
      files.delete_if{ |f| File.basename(f) == 'tc_etc.rb' }
   end

   t.test_files = files
end

desc "Run the test suite for the English package"
Rake::TestTask.new('test_english') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/stdlib/English/*.rb']
end

unless RUBY_PLATFORM.match('mswin')
   desc "Run the test suite for the Etc library"
   Rake::TestTask.new('test_etc') do |t|
      t.libs << 'lib'
      t.warning = true
      t.test_files = FileList['test/stdlib/Etc/*.rb']
   end
end

desc "Run the test suite for the OpenStruct library"
Rake::TestTask.new('test_openstruct') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/stdlib/OpenStruct/*.rb']
end

desc "Run the test suite for the Pathname library"
Rake::TestTask.new('test_pathname') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/stdlib/Pathname/*.rb']
end

desc "Run the test suite for the Rational library"
Rake::TestTask.new('test_rational') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/stdlib/Rational/*.rb']
end

desc "Run the test suite for the Set library"
Rake::TestTask.new('test_set') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/stdlib/Set/*.rb']
end

desc "Run the test suite for the Socket library"
Rake::TestTask.new('test_socket') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/stdlib/Socket/*.rb']
end

desc "Run the test suite for the tmpdir library"
Rake::TestTask.new('test_tmpdir') do |t|
   t.libs << 'lib'
   t.warning = true
   t.test_files = FileList['test/stdlib/Tmpdir/*.rb']
end

### Benchmark Tasks ###
desc "Run the Array benchmarks"
task :bench_array do
   ruby "bench/core/bench_array.rb"
end

desc "Run the Dir benchmarks"
task :bench_dir do
   ruby "bench/core/bench_dir.rb"
end

desc "Run the File::Stat benchmarks"
task :bench_file_stat do
   ruby "bench/core/bench_file_stat.rb"
end

desc "Run the Hash benchmarks"
task :bench_hash do
   ruby "bench/core/bench_hash.rb"
end

desc "Run the Integer benchmarks"
task :bench_integer do
   ruby "bench/core/bench_integer.rb"
end

desc "Run the Math benchmarks"
task :bench_math do
   ruby "bench/core/bench_math.rb"
end

desc "Run the String benchmarks"
task :bench_string do
   ruby "bench/core/bench_string.rb"
end