origen 0.34.3 → 0.52.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (207) hide show
  1. checksums.yaml +5 -5
  2. data/bin/origen +1 -231
  3. data/config/application.rb +12 -3
  4. data/config/boot.rb +2 -7
  5. data/config/commands.rb +3 -74
  6. data/config/rubocop/easy_disabled.yml +4 -0
  7. data/config/rubocop/easy_enabled.yml +0 -4
  8. data/config/rubocop/strict_disabled.yml +4 -0
  9. data/config/rubocop/strict_enabled.yml +0 -4
  10. data/config/version.rb +2 -3
  11. data/lib/origen.rb +27 -14
  12. data/lib/origen/application.rb +88 -2
  13. data/lib/origen/application/deployer.rb +3 -1
  14. data/lib/origen/application/release.rb +2 -2
  15. data/lib/origen/application/runner.rb +35 -20
  16. data/lib/origen/boot.rb +302 -0
  17. data/lib/origen/boot/api.rb +13 -0
  18. data/lib/origen/boot/app.rb +284 -0
  19. data/lib/origen/code_generators.rb +30 -10
  20. data/lib/origen/code_generators/actions.rb +244 -34
  21. data/lib/origen/code_generators/base.rb +9 -2
  22. data/lib/origen/code_generators/block.rb +203 -0
  23. data/lib/origen/code_generators/block_common.rb +100 -0
  24. data/lib/origen/code_generators/dut.rb +62 -0
  25. data/lib/origen/code_generators/feature.rb +50 -0
  26. data/lib/origen/code_generators/klass.rb +41 -0
  27. data/lib/origen/code_generators/model.rb +60 -0
  28. data/lib/origen/code_generators/module.rb +92 -0
  29. data/lib/origen/commands.rb +30 -13
  30. data/lib/origen/commands/archive.rb +175 -0
  31. data/lib/origen/commands/extract.rb +43 -0
  32. data/lib/origen/commands/generate.rb +1 -0
  33. data/lib/origen/commands/lint.rb +6 -1
  34. data/lib/origen/commands/new.rb +48 -24
  35. data/lib/origen/commands/new_resource.rb +41 -0
  36. data/lib/origen/commands/site.rb +52 -0
  37. data/lib/origen/commands/web.rb +11 -6
  38. data/lib/origen/commands_global.rb +9 -7
  39. data/lib/origen/core_ext/numeric.rb +20 -0
  40. data/lib/{option_parser → origen/core_ext/option_parser}/optparse.rb +0 -0
  41. data/lib/origen/dependencies.rb +0 -0
  42. data/lib/origen/file_handler.rb +18 -6
  43. data/lib/origen/generator.rb +19 -10
  44. data/lib/origen/generator/comparator.rb +2 -1
  45. data/lib/origen/generator/flow.rb +3 -1
  46. data/lib/origen/generator/job.rb +60 -16
  47. data/lib/origen/generator/pattern.rb +132 -72
  48. data/lib/origen/generator/pattern_finder.rb +3 -3
  49. data/lib/origen/generator/pattern_sequence.rb +201 -0
  50. data/lib/origen/generator/pattern_sequencer.rb +99 -0
  51. data/lib/origen/generator/pattern_thread.rb +175 -0
  52. data/lib/origen/loader.rb +381 -0
  53. data/lib/origen/log.rb +250 -108
  54. data/lib/origen/model.rb +22 -1
  55. data/lib/origen/model/exporter.rb +50 -10
  56. data/lib/origen/model_initializer.rb +5 -1
  57. data/lib/origen/operating_systems.rb +4 -0
  58. data/lib/origen/parameters.rb +96 -4
  59. data/lib/origen/parameters/set.rb +4 -3
  60. data/lib/origen/pins.rb +10 -8
  61. data/lib/origen/pins/pin.rb +61 -46
  62. data/lib/origen/ports/port.rb +5 -0
  63. data/lib/origen/registers.rb +5 -0
  64. data/lib/origen/registers/bit.rb +57 -53
  65. data/lib/origen/registers/bit_collection.rb +100 -43
  66. data/lib/origen/registers/msb0_delegator.rb +47 -0
  67. data/lib/origen/registers/reg.rb +114 -99
  68. data/lib/origen/revision_control.rb +1 -1
  69. data/lib/origen/revision_control/git.rb +23 -3
  70. data/lib/origen/site_config.rb +251 -60
  71. data/lib/origen/site_config/config.rb +217 -0
  72. data/lib/origen/sub_blocks.rb +106 -31
  73. data/lib/origen/top_level.rb +11 -0
  74. data/lib/origen/users/user.rb +3 -2
  75. data/lib/origen/utility/mailer.rb +42 -9
  76. data/lib/origen/value/bin_str_val.rb +1 -1
  77. data/lib/origen/value/hex_str_val.rb +1 -1
  78. data/lib/origen/version_string.rb +6 -1
  79. data/lib/tasks/gem.rake +6 -1
  80. data/origen_app_generators/Gemfile +19 -0
  81. data/origen_app_generators/Gemfile.lock +152 -0
  82. data/origen_app_generators/LICENSE +21 -0
  83. data/origen_app_generators/README.md +368 -0
  84. data/{templates/code_generators/rakefile.rb → origen_app_generators/Rakefile} +0 -0
  85. data/origen_app_generators/bin/boot.rb +39 -0
  86. data/origen_app_generators/config/application.rb +153 -0
  87. data/origen_app_generators/config/boot.rb +1 -0
  88. data/origen_app_generators/config/commands.rb +63 -0
  89. data/origen_app_generators/config/shared_commands.rb +177 -0
  90. data/origen_app_generators/config/version.rb +8 -0
  91. data/origen_app_generators/doc/history +223 -0
  92. data/origen_app_generators/lbin/bundle +105 -0
  93. data/origen_app_generators/lbin/byebug +29 -0
  94. data/origen_app_generators/lbin/coderay +29 -0
  95. data/origen_app_generators/lbin/htmldiff +29 -0
  96. data/origen_app_generators/lbin/httparty +29 -0
  97. data/origen_app_generators/lbin/httpclient +29 -0
  98. data/origen_app_generators/lbin/kramdown +29 -0
  99. data/origen_app_generators/lbin/ldiff +29 -0
  100. data/origen_app_generators/lbin/nanoc +29 -0
  101. data/origen_app_generators/lbin/nokogiri +29 -0
  102. data/origen_app_generators/lbin/origen +62 -0
  103. data/origen_app_generators/lbin/pry +29 -0
  104. data/origen_app_generators/lbin/rackup +29 -0
  105. data/origen_app_generators/lbin/rake +29 -0
  106. data/origen_app_generators/lbin/rspec +29 -0
  107. data/origen_app_generators/lbin/rubocop +29 -0
  108. data/origen_app_generators/lbin/ruby-parse +29 -0
  109. data/origen_app_generators/lbin/ruby-rewrite +29 -0
  110. data/origen_app_generators/lbin/thor +29 -0
  111. data/origen_app_generators/lbin/tilt +29 -0
  112. data/origen_app_generators/lbin/yard +29 -0
  113. data/origen_app_generators/lbin/yardoc +29 -0
  114. data/origen_app_generators/lbin/yri +29 -0
  115. data/origen_app_generators/lib/origen_app_generators.rb +125 -0
  116. data/origen_app_generators/lib/origen_app_generators/application.rb +62 -0
  117. data/origen_app_generators/lib/origen_app_generators/base.rb +257 -0
  118. data/origen_app_generators/lib/origen_app_generators/empty_application.rb +15 -0
  119. data/origen_app_generators/lib/origen_app_generators/empty_plugin.rb +15 -0
  120. data/origen_app_generators/lib/origen_app_generators/new.rb +170 -0
  121. data/origen_app_generators/lib/origen_app_generators/new_app_tests.rb +4 -0
  122. data/origen_app_generators/lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb +107 -0
  123. data/origen_app_generators/lib/origen_app_generators/plugin.rb +55 -0
  124. data/origen_app_generators/lib/origen_app_generators/test_engineering/common.rb +29 -0
  125. data/origen_app_generators/lib/origen_app_generators/test_engineering/stand_alone_application.rb +64 -0
  126. data/origen_app_generators/lib/origen_app_generators/test_engineering/test_block.rb +61 -0
  127. data/origen_app_generators/origen_app_generators.gemspec +33 -0
  128. data/{templates/code_generators → origen_app_generators/spec}/spec_helper.rb +0 -0
  129. data/origen_app_generators/target/debug.rb +8 -0
  130. data/origen_app_generators/target/default.rb +8 -0
  131. data/origen_app_generators/target/production.rb +0 -0
  132. data/origen_app_generators/templates/app_generators/application/.gitignore +37 -0
  133. data/origen_app_generators/templates/app_generators/application/.irbrc +9 -0
  134. data/origen_app_generators/templates/app_generators/application/.rspec +1 -0
  135. data/origen_app_generators/templates/app_generators/application/.travis.yml +11 -0
  136. data/origen_app_generators/templates/app_generators/application/Gemfile +34 -0
  137. data/origen_app_generators/templates/app_generators/application/Rakefile +7 -0
  138. data/origen_app_generators/templates/app_generators/application/app/blocks/top_level.rb +12 -0
  139. data/origen_app_generators/templates/app_generators/application/app/lib/module.rb +6 -0
  140. data/origen_app_generators/templates/app_generators/application/app/templates/web/index.md.erb +19 -0
  141. data/origen_app_generators/templates/app_generators/application/app/templates/web/layouts/_basic.html.erb +13 -0
  142. data/origen_app_generators/templates/app_generators/application/app/templates/web/partials/_navbar.html.erb +20 -0
  143. data/origen_app_generators/templates/app_generators/application/app/templates/web/release_notes.md.erb +5 -0
  144. data/origen_app_generators/templates/app_generators/application/config/application.rb +121 -0
  145. data/origen_app_generators/templates/app_generators/application/config/boot.rb +4 -0
  146. data/origen_app_generators/templates/app_generators/application/config/commands.rb +79 -0
  147. data/origen_app_generators/templates/app_generators/application/config/maillist_dev.txt +4 -0
  148. data/origen_app_generators/templates/app_generators/application/config/maillist_prod.txt +3 -0
  149. data/origen_app_generators/templates/app_generators/application/config/version.rb +8 -0
  150. data/origen_app_generators/templates/app_generators/application/doc/history +0 -0
  151. data/origen_app_generators/templates/app_generators/application/dot_keep +0 -0
  152. data/origen_app_generators/templates/app_generators/application/origen_core_session +2 -0
  153. data/origen_app_generators/templates/app_generators/application/spec/spec_helper.rb +44 -0
  154. data/origen_app_generators/templates/app_generators/application/target/debug.rb +8 -0
  155. data/origen_app_generators/templates/app_generators/application/target/default.rb +1 -0
  156. data/origen_app_generators/templates/app_generators/application/target/production.rb +4 -0
  157. data/origen_app_generators/templates/app_generators/new/generator.rb +102 -0
  158. data/origen_app_generators/templates/app_generators/new/info.md.erb +9 -0
  159. data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/application.rb +54 -0
  160. data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/base.rb +55 -0
  161. data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/module.rb +28 -0
  162. data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/plugin.rb +64 -0
  163. data/origen_app_generators/templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb +6 -0
  164. data/origen_app_generators/templates/app_generators/plugin/Gemfile +32 -0
  165. data/origen_app_generators/templates/app_generators/plugin/Rakefile +10 -0
  166. data/origen_app_generators/templates/app_generators/plugin/app/templates/web/index.md.erb +37 -0
  167. data/origen_app_generators/templates/app_generators/plugin/app/templates/web/partials/_navbar_external.html.erb +20 -0
  168. data/origen_app_generators/templates/app_generators/plugin/app/templates/web/partials/_navbar_internal.html.erb +20 -0
  169. data/origen_app_generators/templates/app_generators/plugin/config/boot.rb +24 -0
  170. data/origen_app_generators/templates/app_generators/plugin/gemspec.rb +43 -0
  171. data/origen_app_generators/templates/app_generators/test_engineering/environment/j750.rb +1 -0
  172. data/origen_app_generators/templates/app_generators/test_engineering/environment/uflex.rb +1 -0
  173. data/origen_app_generators/templates/app_generators/test_engineering/environment/v93k.rb +1 -0
  174. data/origen_app_generators/templates/app_generators/test_engineering/stand_alone_application/.keep +0 -0
  175. data/origen_app_generators/templates/app_generators/test_engineering/test_block/.keep +0 -0
  176. data/origen_site_config.yml +55 -5
  177. data/templates/code_generators/attributes.rb +20 -0
  178. data/templates/code_generators/class.rb +9 -0
  179. data/templates/code_generators/controller.rb +87 -0
  180. data/templates/code_generators/model.rb +21 -0
  181. data/templates/code_generators/module.rb +4 -0
  182. data/templates/code_generators/parameters.rb +19 -0
  183. data/templates/code_generators/pins.rb +28 -0
  184. data/templates/code_generators/registers.rb +20 -0
  185. data/templates/code_generators/sub_blocks.rb +24 -0
  186. data/templates/code_generators/timesets.rb +24 -0
  187. data/templates/code_generators/version.rb +0 -1
  188. data/templates/git/gitignore.erb +0 -1
  189. data/vendor/lib/models/origen/export1.rb +77 -0
  190. data/vendor/lib/models/origen/export1/block1.rb +13 -0
  191. data/vendor/lib/models/origen/export1/block1/x.rb +36 -0
  192. data/vendor/lib/models/origen/non_origen_meta_data.md +1 -0
  193. metadata +149 -68
  194. data/bin/fix_my_workspace +0 -100
  195. data/lib/c99/ate_interface.rb +0 -77
  196. data/lib/c99/nvm.rb +0 -110
  197. data/lib/c99/target/mock2.rb +0 -1
  198. data/lib/c99/target/subdir/mock3.rb +0 -1
  199. data/lib/origen/code_generators/bundler.rb +0 -17
  200. data/lib/origen/code_generators/gem_setup.rb +0 -49
  201. data/lib/origen/code_generators/rake.rb +0 -13
  202. data/lib/origen/code_generators/rspec.rb +0 -12
  203. data/lib/origen/commands/add.rb +0 -12
  204. data/lib/tasks/private/build.rake +0 -8
  205. data/templates/code_generators/gemfile_app.rb +0 -4
  206. data/templates/code_generators/gemfile_plugin.rb +0 -6
  207. data/templates/code_generators/gemspec.rb +0 -33
@@ -0,0 +1,4 @@
1
+ # This file has been added by origen_app_generators to test that the target can be
2
+ # loaded within this application, it will not be included in your final application
3
+ # builds once your generator has been released.
4
+ Origen.app.target.load!
@@ -0,0 +1,107 @@
1
+ module OrigenAppGenerators
2
+ module OrigenInfrastructure
3
+ # Generates a generic application shell
4
+ class AppGeneratorPlugin < Plugin
5
+ desc "A plugin to make your own application templates available through the 'origen new' command"
6
+
7
+ def initialize(*args)
8
+ @audience = :internal
9
+ @validate_release_tests = ['origen app_gen:test --regression']
10
+ super
11
+ end
12
+
13
+ # Any methods that are not protected will get invoked in the order that they are
14
+ # defined when the generator is run, method naming is irrelevant unless you want
15
+ # to override a method that is defined by the parent class
16
+
17
+ def get_user_input
18
+ # The methods to get the common user input that applies to all applications will
19
+ # get called at the start automatically, you have a chance here to ask any additional
20
+ # questions that are specific to the type of application being generated
21
+ end
22
+
23
+ def generate_files
24
+ @runtime_dependencies = [
25
+ ['origen_app_generators', ">= #{Origen.app!.version}"]
26
+ ]
27
+ @post_runtime_dependency_comments = [
28
+ 'DO NOT ADD ANY ADDITIONAL RUNTIME DEPENDENCIES HERE, WHEN THESE GENERATORS',
29
+ 'ARE INVOKED TO GENERATE A NEW APPLICATION IT WILL NOT BE LAUNCHED FROM WITHIN',
30
+ 'A BUNDLED ENVIRONMENT.',
31
+ '',
32
+ 'THEREFORE GENERATORS MUST NOT RELY ON ANY 3RD PARTY GEMS THAT ARE NOT',
33
+ 'PRESENT AS PART OF A STANDARD ORIGEN INSTALLATION - I.E. YOU CAN ONLY RELY',
34
+ 'ON THE GEMS THAT ORIGEN ITSELF DEPENDS ON.'
35
+ ]
36
+ # Calling this will build all files, directories and symlinks contained in the
37
+ # hash returned by the filelist method
38
+ build_filelist
39
+ end
40
+
41
+ def modify_files
42
+ # If you want to modify any of the generated files you can do so now, you have access
43
+ # to all of the Thor Action methods described here:
44
+ # http://www.rubydoc.info/github/wycats/thor/Thor/Actions
45
+ # See the enable method in lib/app_generators/new.rb for some examples of using these.
46
+ end
47
+
48
+ def conclude
49
+ # Print out anything you think the user should know about their new application at the end
50
+ puts "New app created at: #{destination_root}"
51
+ puts
52
+ puts 'Create your first generator by running this command within your new app:'
53
+ puts ' origen app_gen:new'
54
+ puts
55
+ end
56
+
57
+ protected
58
+
59
+ # Defines the filelist for the generator, the default list is inherited from the
60
+ # parent class (Plugin).
61
+ # The filelist can contain references to generate files, directories or symlinks in the
62
+ # new application.
63
+ #
64
+ # Generally to make your generator more maintainable try and re-use as much as possible
65
+ # from the parent generator, this means that your generator will automatically stay up
66
+ # to date with the latest conventions
67
+ #
68
+ # The master templates live in templates/app_generators/plugin, but
69
+ # DO NOT MODIFY THESE FILES DIRECTLY.
70
+ # Either add or remove things post-generation in the modify_files method or copy the
71
+ # master file to the equivalent sub-directory of templates/app_generators/origen_infrastructure_engineering/app_generator_plugin
72
+ # which will override the version in the master directory.
73
+ #
74
+ # Additional files can be added or removed from the filelist as shown below.
75
+ def filelist
76
+ @filelist ||= begin
77
+ list = super # Always pick up the parent list
78
+ # Example of how to remove a file from the parent list
79
+ # list.delete(:web_doc_layout)
80
+ list.delete(:templates_shared)
81
+ # Example of how to add a file, in this case the file will be compiled and copied to
82
+ # the same location in the new app
83
+ # list[:config_shared_commands] = { source: 'config/shared_commands.rb' }
84
+ list[:config_load_generators] = { source: 'config/load_generators.rb' }
85
+ list[:lib_base] = { source: 'app/lib/base.rb', dest: "app/lib/#{@name}/base.rb" }
86
+ list[:lib_plugin] = { source: 'app/lib/plugin.rb', dest: "app/lib/#{@name}/plugin.rb" }
87
+ list[:lib_application] = { source: 'app/lib/application.rb', dest: "app/lib/#{@name}/application.rb" }
88
+ # Alternatively specifying a different destination, typically you would do this when
89
+ # the final location is dynamic
90
+ # list[:gemspec] = { source: 'gemspec.rb', dest: "#{@name}.gemspec" }
91
+ # Example of how to create a directory
92
+ list[:templates_app] = { dest: 'app/templates/app_generators/application', type: :directory }
93
+ list[:templates_plugin] = { dest: 'app/templates/app_generators/plugin', type: :directory }
94
+ list[:templates_base] = { dest: 'app/templates/app_generators/base', type: :directory }
95
+ # By default, directories created in this way will contain a .keep file, to inhibit this:
96
+ # list[:pattern_dir] = { dest: "pattern", type: :directory, nokeep: true }
97
+ # Example of how to create a symlink
98
+ # list[:target_default] = { source: 'debug.rb', # Relative to the file being linked to
99
+ # dest: 'target/default.rb', # Relative to destination_root
100
+ # type: :symlink }
101
+ # Remember to return the final list
102
+ list
103
+ end
104
+ end
105
+ end
106
+ end
107
+ end
@@ -0,0 +1,55 @@
1
+ module OrigenAppGenerators
2
+ # The base generator class that should be used by all plugin generators
3
+ class Plugin < Application
4
+ def get_additional_user_input
5
+ get_summary
6
+ get_audience unless @audience
7
+ end
8
+
9
+ protected
10
+
11
+ # See Application#filelist for more details
12
+ def filelist
13
+ @filelist ||= begin
14
+ list = super
15
+ list.delete(:web_doc_layout)
16
+ list.delete(:web_references)
17
+ list.delete(:web_defintions)
18
+ list.delete(:web_installation)
19
+ list.delete(:web_introduction)
20
+ list[:gemspec] = { source: 'gemspec.rb', dest: "#{@name}.gemspec" }
21
+ list[:templates_shared] = { dest: 'app/templates/shared', type: :directory }
22
+ if @audience == :external
23
+ list[:travis] = { source: '.travis.yml' }
24
+ list[:web_navbar] = { source: 'app/templates/web/partials/_navbar_external.html.erb', dest: 'app/templates/web/partials/_navbar.html.erb' }
25
+ else
26
+ list[:web_navbar] = { source: 'app/templates/web/partials/_navbar_internal.html.erb', dest: 'app/templates/web/partials/_navbar.html.erb' }
27
+ end
28
+ list
29
+ end
30
+ end
31
+
32
+ def get_summary
33
+ puts
34
+ puts 'DESCRIBE YOUR NEW PLUGIN IN A FEW WORDS'
35
+ puts
36
+ @summary = get_text(single: true)
37
+ end
38
+
39
+ # Prompts the user to say whether the new plugin is intended for an internal
40
+ # or external audience (meaning it will published to rubygems.org)
41
+ def get_audience(proposal = nil)
42
+ puts
43
+ puts 'IS THIS PLUGIN GOING TO BE RELEASED TO AN EXTERNAL AUDIENCE?'
44
+ puts
45
+ puts 'By answering yes, this plugin will be pushed to rubygems.org when it is released and it will be available outside of your company.'
46
+ puts
47
+ confirm_external = get_text(confirm: :return_boolean, default: 'no')
48
+ @audience = :external if confirm_external
49
+ end
50
+
51
+ def type
52
+ :plugin
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,29 @@
1
+ module OrigenAppGenerators
2
+ module TestEngineering
3
+ module Common
4
+ def common_filelist(list)
5
+ # Example of how to remove a file from the parent list
6
+ # list.delete(:target_debug)
7
+ # Example of how to add a file, in this case the file will be compiled and copied to
8
+ # the same location in the new app
9
+ list[:environment_v93k] = { source: 'environment/v93k.rb' }
10
+ list[:environment_j750] = { source: 'environment/j750.rb' }
11
+ list[:environment_uflex] = { source: 'environment/uflex.rb' }
12
+ # Alternatively specifying a different destination, typically you would do this when
13
+ # the final location is dynamic
14
+ # list[:gemspec] = { source: 'gemspec.rb', dest: "#{@name}.gemspec" }
15
+ # Example of how to create a directory
16
+ # list[:pattern_dir] = { dest: 'pattern', type: :directory }
17
+ # Example of how to create a symlink
18
+ list[:environment_default] = { source: 'uflex.rb', # Relative to the file being linked to
19
+ dest: 'environment/default.rb', # Relative to destination_root
20
+ type: :symlink }
21
+ # Test engineering source directories
22
+ list[:patterns_dir] = { dest: 'app/patterns', type: :directory }
23
+ list[:flows_dir] = { dest: 'app/flows', type: :directory }
24
+ # Remember to return the final list
25
+ list
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,64 @@
1
+ module OrigenAppGenerators
2
+ module TestEngineering
3
+ # Generates a generic application shell
4
+ class StandAloneApplication < Application
5
+ include Common
6
+
7
+ desc 'A stand alone test engineering application'
8
+
9
+ # Any methods that are not protected will get invoked in the order that they are
10
+ # defined when the generator is run, method naming is irrelevant unless you want
11
+ # to override a method that is defined by the parent class
12
+
13
+ def get_user_input
14
+ # The methods to get the common user input that applies to all applications will
15
+ # get called at the start automatically, you have a chance here to ask any additional
16
+ # questions that are specific to the type of application being generated
17
+ end
18
+
19
+ def generate_files
20
+ @development_dependencies = [
21
+ ['origen_testers']
22
+ ]
23
+ build_filelist
24
+ end
25
+
26
+ def modify_files
27
+ # If you want to modify any of the generated files you can do so now, you have access
28
+ # to all of the Thor Action methods described here:
29
+ # http://www.rubydoc.info/github/wycats/thor/Thor/Actions
30
+ # See the enable method in lib/app_generators/new.rb for some examples of using these.
31
+ end
32
+
33
+ def conclude
34
+ # Print out anything you think the user should know about their new application at the end
35
+ puts "New app created at: #{destination_root}"
36
+ end
37
+
38
+ protected
39
+
40
+ # Defines the filelist for the generator, the default list is inherited from the
41
+ # parent class (Plugin).
42
+ # The filelist can contain references to generate files, directories or symlinks in the
43
+ # new application.
44
+ #
45
+ # Generally to make your generator more maintainable try and re-use as much as possible
46
+ # from the parent generator, this means that your generator will automatically stay up
47
+ # to date with the latest conventions
48
+ #
49
+ # The master templates live in templates/app_generators/plugin, but
50
+ # DO NOT MODIFY THESE FILES DIRECTLY.
51
+ # Either add or remove things post-generation in the modify_files method or copy the
52
+ # master file to the equivalent sub-directory of templates/app_generators/test_engineering/mpg_test_block
53
+ # which will override the version in the master directory.
54
+ #
55
+ # Additional files can be added or removed from the filelist as shown below.
56
+ def filelist
57
+ @filelist ||= begin
58
+ list = common_filelist(super) # Always pick up the parent list
59
+ list
60
+ end
61
+ end
62
+ end
63
+ end
64
+ end
@@ -0,0 +1,61 @@
1
+ module OrigenAppGenerators
2
+ module TestEngineering
3
+ # Generates a generic plugin shell
4
+ class TestBlock < Plugin
5
+ include Common
6
+
7
+ desc 'An IP test module intended to plugin into a top-level (SoC) application'
8
+
9
+ def initialize(*args)
10
+ @audience = :internal
11
+ super
12
+ end
13
+
14
+ def get_user_input
15
+ # The methods to get the common user input that applies to all applications will
16
+ # get called at the start automatically, you have a chance here to ask any additional
17
+ # questions that are specific to the type of application being generated
18
+ end
19
+
20
+ def generate_files
21
+ @runtime_dependencies = [
22
+ ['origen_testers', '>= 0.6.1']
23
+ ]
24
+ build_filelist
25
+ end
26
+
27
+ def final_modifications
28
+ prepend_to_file "app/lib/#{@name}.rb", "require 'origen_testers'\n"
29
+ end
30
+
31
+ def conclude
32
+ puts "New test module created at: #{destination_root}"
33
+ end
34
+
35
+ protected
36
+
37
+ # Defines the filelist for the generator, the default list is inherited from the
38
+ # parent class (Plugin).
39
+ # The filelist can contain references to generate files, directories or symlinks in the
40
+ # new application.
41
+ #
42
+ # Generally to make your generator more maintainable try and re-use as much as possible
43
+ # from the parent generator, this means that your generator will automatically stay up
44
+ # to date with the latest conventions
45
+ #
46
+ # The master templates live in templates/app_generators/plugin, but
47
+ # DO NOT MODIFY THESE FILES DIRECTLY.
48
+ # Either add or remove things post-generation in the modify_files method or copy the
49
+ # master file to the equivalent sub-directory of templates/app_generators/test_engineering/mpg_test_block
50
+ # which will override the version in the master directory.
51
+ #
52
+ # Additional files can be added or removed from the filelist as shown below.
53
+ def filelist
54
+ @filelist ||= begin
55
+ list = common_filelist(super) # Always pick up the parent list
56
+ list
57
+ end
58
+ end
59
+ end
60
+ end
61
+ end
@@ -0,0 +1,33 @@
1
+ # -*- encoding: utf-8 -*-
2
+ # stub: origen_app_generators 2.0.0 ruby lib
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "origen_app_generators".freeze
6
+ s.version = "2.0.0"
7
+
8
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.8.11".freeze) if s.respond_to? :required_rubygems_version=
9
+ s.require_paths = ["lib".freeze]
10
+ s.authors = ["Stephen McGinty".freeze]
11
+ s.date = "2019-06-10"
12
+ s.email = ["stephen.f.mcginty@gmail.com".freeze]
13
+ s.files = ["bin/boot.rb".freeze, "config/application.rb".freeze, "config/boot.rb".freeze, "config/commands.rb".freeze, "config/shared_commands.rb".freeze, "config/version.rb".freeze, "lib/origen_app_generators.rb".freeze, "lib/origen_app_generators/application.rb".freeze, "lib/origen_app_generators/base.rb".freeze, "lib/origen_app_generators/empty_application.rb".freeze, "lib/origen_app_generators/empty_plugin.rb".freeze, "lib/origen_app_generators/new.rb".freeze, "lib/origen_app_generators/new_app_tests.rb".freeze, "lib/origen_app_generators/origen_infrastructure/app_generator_plugin.rb".freeze, "lib/origen_app_generators/plugin.rb".freeze, "lib/origen_app_generators/test_engineering/common.rb".freeze, "lib/origen_app_generators/test_engineering/stand_alone_application.rb".freeze, "lib/origen_app_generators/test_engineering/test_block.rb".freeze, "templates/app_generators".freeze, "templates/app_generators/application".freeze, "templates/app_generators/application/.gitignore".freeze, "templates/app_generators/application/.irbrc".freeze, "templates/app_generators/application/.rspec".freeze, "templates/app_generators/application/.travis.yml".freeze, "templates/app_generators/application/Gemfile".freeze, "templates/app_generators/application/Rakefile".freeze, "templates/app_generators/application/app".freeze, "templates/app_generators/application/app/blocks".freeze, "templates/app_generators/application/app/blocks/top_level.rb".freeze, "templates/app_generators/application/app/lib".freeze, "templates/app_generators/application/app/lib/module.rb".freeze, "templates/app_generators/application/app/templates".freeze, "templates/app_generators/application/app/templates/web".freeze, "templates/app_generators/application/app/templates/web/index.md.erb".freeze, "templates/app_generators/application/app/templates/web/layouts".freeze, "templates/app_generators/application/app/templates/web/layouts/_basic.html.erb".freeze, "templates/app_generators/application/app/templates/web/partials".freeze, "templates/app_generators/application/app/templates/web/partials/_navbar.html.erb".freeze, "templates/app_generators/application/app/templates/web/release_notes.md.erb".freeze, "templates/app_generators/application/config".freeze, "templates/app_generators/application/config/application.rb".freeze, "templates/app_generators/application/config/boot.rb".freeze, "templates/app_generators/application/config/commands.rb".freeze, "templates/app_generators/application/config/maillist_dev.txt".freeze, "templates/app_generators/application/config/maillist_prod.txt".freeze, "templates/app_generators/application/config/version.rb".freeze, "templates/app_generators/application/doc".freeze, "templates/app_generators/application/doc/history".freeze, "templates/app_generators/application/dot_keep".freeze, "templates/app_generators/application/origen_core_session".freeze, "templates/app_generators/application/spec".freeze, "templates/app_generators/application/spec/spec_helper.rb".freeze, "templates/app_generators/application/target".freeze, "templates/app_generators/application/target/debug.rb".freeze, "templates/app_generators/application/target/default.rb".freeze, "templates/app_generators/application/target/production.rb".freeze, "templates/app_generators/new".freeze, "templates/app_generators/new/generator.rb".freeze, "templates/app_generators/new/info.md.erb".freeze, "templates/app_generators/origen_infrastructure".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/application.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/base.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/module.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/app/lib/plugin.rb".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config".freeze, "templates/app_generators/origen_infrastructure/app_generator_plugin/config/load_generators.rb".freeze, "templates/app_generators/plugin".freeze, "templates/app_generators/plugin/Gemfile".freeze, "templates/app_generators/plugin/Rakefile".freeze, "templates/app_generators/plugin/app".freeze, "templates/app_generators/plugin/app/templates".freeze, "templates/app_generators/plugin/app/templates/web".freeze, "templates/app_generators/plugin/app/templates/web/index.md.erb".freeze, "templates/app_generators/plugin/app/templates/web/partials".freeze, "templates/app_generators/plugin/app/templates/web/partials/_navbar_external.html.erb".freeze, "templates/app_generators/plugin/app/templates/web/partials/_navbar_internal.html.erb".freeze, "templates/app_generators/plugin/config".freeze, "templates/app_generators/plugin/config/boot.rb".freeze, "templates/app_generators/plugin/gemspec.rb".freeze, "templates/app_generators/test_engineering".freeze, "templates/app_generators/test_engineering/environment".freeze, "templates/app_generators/test_engineering/environment/j750.rb".freeze, "templates/app_generators/test_engineering/environment/uflex.rb".freeze, "templates/app_generators/test_engineering/environment/v93k.rb".freeze, "templates/app_generators/test_engineering/stand_alone_application".freeze, "templates/app_generators/test_engineering/stand_alone_application/.keep".freeze, "templates/app_generators/test_engineering/test_block".freeze, "templates/app_generators/test_engineering/test_block/.keep".freeze]
14
+ s.homepage = "http://origen-sdk.org/origen_app_generators".freeze
15
+ s.licenses = ["MIT".freeze]
16
+ s.required_ruby_version = Gem::Requirement.new(">= 1.9.3".freeze)
17
+ s.rubygems_version = "2.7.7".freeze
18
+ s.summary = "Origen application generators".freeze
19
+
20
+ s.installed_by_version = "2.7.7" if s.respond_to? :installed_by_version
21
+
22
+ if s.respond_to? :specification_version then
23
+ s.specification_version = 4
24
+
25
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
+ s.add_runtime_dependency(%q<origen>.freeze, [">= 0.40.2"])
27
+ else
28
+ s.add_dependency(%q<origen>.freeze, [">= 0.40.2"])
29
+ end
30
+ else
31
+ s.add_dependency(%q<origen>.freeze, [">= 0.40.2"])
32
+ end
33
+ end
@@ -0,0 +1,8 @@
1
+ # Production mode will require that there are no modified files in the workspace
2
+ # and any other conditions that you add to your application.
3
+ # Normally production targets define the target and then debug targets
4
+ # are setup to load the production target before switching Origen to debug
5
+ # mode as shown below.
6
+ load "#{Origen.root}/target/production.rb"
7
+
8
+ Origen.mode = :debug
@@ -0,0 +1,8 @@
1
+ # Production mode will require that there are no modified files in the workspace
2
+ # and any other conditions that you add to your application.
3
+ # Normally production targets define the target and then debug targets
4
+ # are setup to load the production target before switching Origen to debug
5
+ # mode as shown below.
6
+ load "#{Origen.root}/target/production.rb"
7
+
8
+ Origen.mode = :debug
File without changes
@@ -0,0 +1,37 @@
1
+ # Misc
2
+ .irb_history
3
+ .byebug_history
4
+
5
+ # Editor cruft
6
+ *.swp
7
+ *.swo
8
+ *~
9
+
10
+ # Origen local files
11
+ /.bundle
12
+ /target/.default
13
+ /environment/.default
14
+ /release_note.txt
15
+ /pkg
16
+ /lbin
17
+ /.bin
18
+ /list/referenced.list
19
+ /tags
20
+ /.ref
21
+ /.ws
22
+ /.lsf
23
+ /.db
24
+ /log
25
+ /output
26
+ /web
27
+ /coverage
28
+ /.ref
29
+ /.yardoc
30
+ /.collection
31
+ /.bin
32
+ /.session
33
+ /tmp
34
+
35
+ # Cruft from other revision control systems
36
+ .SYNC
37
+ .svn
@@ -0,0 +1,9 @@
1
+ $VERBOSE=nil
2
+ require 'pp'
3
+ require 'rubygems'
4
+ require 'irb/completion'
5
+ require 'irb/ext/save-history'
6
+
7
+ IRB.conf[:SAVE_HISTORY] = 100
8
+ IRB.conf[:AUTO_INDENT] = true
9
+ IRB.conf[:IRB_NAME] = "origen"
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ - 2.2.2
5
+ script:
6
+ - bundle exec origen -v
7
+ - bundle exec origen specs
8
+ - bundle exec origen examples
9
+ - bundle exec origen web compile --no-serve
10
+ env:
11
+ - ORIGEN_GEM_USE_FROM_SYSTEM=false ORIGEN_GEM_MANAGE_BUNDLER=false