Sha256: 3d8d1c30d36d7026868912446195d460a40ec75d26774669b1c9c43b9557af05

Contents?: true

Size: 1.04 KB

Versions: 12

Compression:

Stored size: 1.04 KB

Contents

# This file should be used to extend origen with application specific tasks

aliases ={

}

@command = aliases[@command] || @command

case @command

when "specs"
  require "rspec"
  exit RSpec::Core::Runner.run(['spec'])

when "examples", "test"  
  status = 0

  ARGV = %w(templates/test -t debug -r approved)
  load "origen/commands/compile.rb"
  
  if Origen.app.stats.changed_files == 0 &&
     Origen.app.stats.new_files == 0 &&
     Origen.app.stats.changed_patterns == 0 &&
     Origen.app.stats.new_patterns == 0

    Origen.app.stats.report_pass
  else
    Origen.app.stats.report_fail
    status = 1
  end
  puts
  if @command == "test"
    Origen.app.unload_target!
    require "rspec"
    result = RSpec::Core::Runner.run(['spec'])
    status = status == 1 ? 1 : result
  end
  exit status

else
  @application_commands = <<-EOT
 specs        Run the specs (unit tests), -c will enable coverage
 examples     Run the examples (acceptance tests), -c will enable coverage
 test         Run both specs and examples, -c will enable coverage
  EOT

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
cross_origen-1.4.0 config/commands.rb
cross_origen-1.3.0 config/commands.rb
cross_origen-1.2.3 config/commands.rb
cross_origen-1.2.2 config/commands.rb
cross_origen-1.2.1 config/commands.rb
cross_origen-1.2.0 config/commands.rb
cross_origen-1.1.0 config/commands.rb
cross_origen-1.0.0 config/commands.rb
cross_origen-0.7.0 config/commands.rb
cross_origen-0.6.1 config/commands.rb
cross_origen-0.6.0 config/commands.rb
cross_origen-0.5.0 config/commands.rb