1
0
Fork 0
mirror of https://github.com/thoughtbot/capybara-webkit synced 2023-03-27 23:22:28 -04:00

Merge pull request #990 from joankaradimov/parallel-build

Build the webkit server executable in parallel
This commit is contained in:
Thomas Walpole 2017-11-07 05:40:27 -08:00 committed by GitHub
commit 0fa9b513fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,3 +1,4 @@
require 'etc'
require "fileutils"
require "rbconfig"
require "shellwords"
@ -90,7 +91,8 @@ module CapybaraWebkitBuilder
end
def make(target = "")
env_hide("CDPATH") { sh("#{make_bin} #{target}") }
job_count = Etc.respond_to?(:nprocessors) ? Etc.nprocessors : 1
env_hide('CDPATH') { sh("#{make_bin} #{target} --jobs=#{job_count}") }
end
def env_hide(name)