File: Rakefile

package info (click to toggle)
ruby-posix-spawn 0.3.13-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 268 kB
  • sloc: ruby: 974; ansic: 312; makefile: 8
file content (43 lines) | stat: -rw-r--r-- 1,107 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
task :default => :test

# ==========================================================
# Packaging
# ==========================================================

GEMSPEC = eval(File.read('posix-spawn.gemspec'))

require 'rubygems/package_task'
Gem::PackageTask.new(GEMSPEC) do |pkg|
end

# ==========================================================
# Ruby Extension
# ==========================================================

begin
  require 'rake/extensiontask'
rescue LoadError => boom
  warn "ERROR: The rake-compiler gem dependency is missing."
  warn "Please run `bundle install' and try again."
  raise
end
Rake::ExtensionTask.new('posix_spawn_ext', GEMSPEC) do |ext|
  ext.ext_dir = 'ext'
end
task :build => :compile

# ==========================================================
# Testing
# ==========================================================

require 'rake/testtask'
Rake::TestTask.new 'test' do |t|
  t.libs << "test"
  t.test_files = FileList['test/test_*.rb']
end
task :test => :build

desc 'Run some benchmarks'
task :benchmark => :build do
  ruby '-Ilib', 'bin/posix-spawn-benchmark'
end