Sha256: 774e43174a0ea8112a480f04f443b241885f34a2c2f7999220a9fcfbbca0dfbf

Contents?: true

Size: 1.64 KB

Versions: 6

Compression:

Stored size: 1.64 KB

Contents

# This file should be used to extend the rgen command line tool with tasks 
# specific to your application.
# The comments below should help to get started and you can also refer to
# lib/rgen/commands.rb in your RGen core workspace for more examples and 
# inspiration.
#
# Also see the official docs on adding commands:
#   http://rgen.freescale.net/rgen/latest/guides/custom/commands/

# Map any command aliases here, for example to allow 'rgen ex' to refer to a 
# command called execute you would add a reference as shown below: 
aliases ={
#  "ex" => "execute",
}

# The requested command is passed in here as @command, this checks it against
# the above alias table and should not be removed.
@command = aliases[@command] || @command

# Now branch to the specific task code
case @command

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


when 'examples'  
  Origen.load_application
  status = 0

  # Pattern generator tests
  ARGV = %w(example -t dev -r approved)
  load "#{Origen.top}/lib/origen/commands/generate.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
  exit status  # Exit with a 1 on the event of a failure per std unix result codes

# Always leave an else clause to allow control to fall back through to the
# RGen command handler.
else
  @application_commands = <<-EOT
 specs        Run the specs (tests), -c will enable coverage
 examples     Run the examples (tests), -c will enable coverage
  EOT

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
origen_ahb-0.2.2 config/commands.rb
origen_ahb-0.2.1 config/commands.rb
origen_ahb-0.2.0 config/commands.rb
origen_ahb-0.2.0.pre10 config/commands.rb
origen_ahb-0.2.0.pre9 config/commands.rb
origen_ahb-0.2.0.pre8 config/commands.rb