Class: Cerberus::Builder::Bjam
- Inherits:
-
Object
- Object
- Cerberus::Builder::Bjam
- Defined in:
- lib/cerberus/builder/bjam.rb
Instance Attribute Summary collapse
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Instance Method Summary collapse
- #brokeness ⇒ Object
-
#initialize(config) ⇒ Bjam
constructor
A new instance of Bjam.
- #run ⇒ Object
- #successful? ⇒ Boolean
Constructor Details
#initialize(config) ⇒ Bjam
Returns a new instance of Bjam.
6 7 8 |
# File 'lib/cerberus/builder/bjam.rb', line 6 def initialize(config) @config = config end |
Instance Attribute Details
#output ⇒ Object (readonly)
Returns the value of attribute output.
4 5 6 |
# File 'lib/cerberus/builder/bjam.rb', line 4 def output @output end |
Instance Method Details
#brokeness ⇒ Object
27 28 29 |
# File 'lib/cerberus/builder/bjam.rb', line 27 def brokeness return nil end |
#run ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/cerberus/builder/bjam.rb', line 10 def run #set correct mountpoint if it present build_dir = @config[:builder, :bjam, :build_dir] Dir.chdir(build_dir) if build_dir cmd = @config[:builder, :bjam, :cmd] || 'bjam' task = @config[:builder, :bjam, :target] #|| 'clean' @output = `#{cmd} #{task} 2>&1` successful? end |
#successful? ⇒ Boolean
22 23 24 25 |
# File 'lib/cerberus/builder/bjam.rb', line 22 def successful? $?.exitstatus == 0 and not @output =~ /failed|error:|skipped/ #/\*\*\* \d+ failure(s)? detected in test suite/ and not @output.include?("syntax error") end |