nuke the cpu detection

This commit is contained in:
John Bintz 2011-11-10 11:18:55 -05:00
parent 5ca065728d
commit 495fd1900e
3 changed files with 2 additions and 31 deletions

View File

@ -1,5 +1,5 @@
module Jasmine module Jasmine
module Headless module Headless
VERSION = "0.7.3" VERSION = "0.8.0"
end end
end end

View File

@ -2,12 +2,6 @@ require 'rbconfig'
require 'rubygems' require 'rubygems'
require 'rubygems/version' require 'rubygems/version'
begin
require 'facter'
rescue LoadError
warn 'Including Facter allows for detection of # of cpus, resulting in faster compilations.'
end
module Qt module Qt
class NotInstalledError < StandardError; end class NotInstalledError < StandardError; end
class Qmake class Qmake
@ -45,11 +39,7 @@ module Qt
system command(project_file) system command(project_file)
system %{make #{make_options}} system %{make}
end
def make_options
"-j#{number_of_cpus}"
end end
# #
@ -103,14 +93,6 @@ module Qt
end.compact.join(" ") end.compact.join(" ")
end end
def number_of_cpus
if defined?(Facter)
Facter.sp_number_processors rescue Facter.processorcount
else
1
end
end
def get_exe_path(command) def get_exe_path(command)
path = %x{which #{command}}.strip path = %x{which #{command}}.strip
path = nil if path == '' path = nil if path == ''

View File

@ -138,16 +138,5 @@ describe Qt::Qmake do
end end
end end
end end
describe '.make_options' do
let(:cpu_count) { 3 }
subject { Qt::Qmake.make_options }
before do
Qt::Qmake.stubs(:number_of_cpus).returns(cpu_count)
end
it { should == "-j#{cpu_count}" }
end
end end