Class: Cerberus::Builder::Bjam

Inherits:
Object
  • Object
show all
Defined in:
lib/cerberus/builder/bjam.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#outputObject (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

#brokenessObject



27
28
29
# File 'lib/cerberus/builder/bjam.rb', line 27

def brokeness
  return nil
end

#runObject



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

Returns:

  • (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