origen 0.60.3 → 0.60.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9240129e4a28764211fd9a8d52e03105fd1453141aae8993981ffa3c19a7d79
4
- data.tar.gz: 824f643a5fbbaa5df88227fa0feee64ccf024aaa19886b263411d156b2bf4746
3
+ metadata.gz: ff8cb5a2c731d92632524eb3e3c946ac02f3c41b78ac8fe80ecad1f69ef45a12
4
+ data.tar.gz: 2d1a30494e052b4645948fa71f0fcdc8b291f36d6d176586c3b2ae615116b532
5
5
  SHA512:
6
- metadata.gz: 6c038200763a2eba085f52b2d03c3cabdae42d6a9e82487095d4c2acafed827228294c74d1a615bb722fcf35d3717c978d15a259c98febdff8fef6680e5fe2bb
7
- data.tar.gz: 855e2f2085c61f2e9f32843fc56956c83c020a66ca386712fc3a0000e60feb009d3c2ad8f8476af1d24fa83eca5a9c1047b3475bc97aa3c7a6d0e5ccfb0d0c1d
6
+ metadata.gz: c44b2a16e3266e921da6b1fea2223e1600d2c382851302ac44c07e4191cec175f4b52ede7018ccf463c8bd391dcb737cd47c9f68f624b8b93a7a30842d9afa85
7
+ data.tar.gz: 79c7c3e8693243ec9dd06a34e5b9dd7e2b6829b4de238cff1be58d83c163dc01bc3f1f179c00e3dbdcdb77fa7e3b680dfe348db7f3dd447fbb14370465e64f12
data/config/version.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Origen
2
2
  MAJOR = 0
3
3
  MINOR = 60
4
- BUGFIX = 3
4
+ BUGFIX = 7
5
5
  DEV = nil
6
6
  VERSION = [MAJOR, MINOR, BUGFIX].join(".") + (DEV ? ".pre#{DEV}" : '')
7
7
  end
@@ -253,6 +253,16 @@ module Origen
253
253
 
254
254
  # Build the log file from the completed jobs
255
255
  def build_log(options = {})
256
+ @completed_patterns = 0
257
+ @total_vectors = 0
258
+ @total_duration = 0
259
+ @completed_files = 0
260
+ @changed_patterns = 0
261
+ @changed_files = 0
262
+ @new_patterns = 0
263
+ @new_files = 0
264
+ @failed_patterns = 0
265
+ @failed_files = 0
256
266
  log_method = options[:log_file] ? options[:log_file] : :info
257
267
  Origen.log.send(log_method, '*' * 70)
258
268
  completed_jobs.each do |job|
@@ -271,25 +281,25 @@ module Origen
271
281
  begin
272
282
  line.gsub!(/\e\[\d+m/, '') # Remove any coloring
273
283
  if line =~ /Total patterns:\s+(\d+)/
274
- stats.completed_patterns += Regexp.last_match[1].to_i
284
+ @completed_patterns = Regexp.last_match[1].to_i
275
285
  elsif line =~ /Total vectors:\s+(\d+)/
276
- stats.total_vectors += Regexp.last_match[1].to_i
286
+ @total_vectors = Regexp.last_match[1].to_i
277
287
  elsif line =~ /Total duration:\s+(\d+\.\d+)/
278
- stats.total_duration += Regexp.last_match[1].to_f
288
+ @total_duration = Regexp.last_match[1].to_f
279
289
  elsif line =~ /Total files:\s+(\d+)/
280
- stats.completed_files += Regexp.last_match[1].to_i
290
+ @completed_files = Regexp.last_match[1].to_i
281
291
  elsif line =~ /Changed patterns:\s+(\d+)/
282
- stats.changed_patterns += Regexp.last_match[1].to_i
292
+ @changed_patterns = Regexp.last_match[1].to_i
283
293
  elsif line =~ /Changed files:\s+(\d+)/
284
- stats.changed_files += Regexp.last_match[1].to_i
294
+ @changed_files = Regexp.last_match[1].to_i
285
295
  elsif line =~ /New patterns:\s+(\d+)/
286
- stats.new_patterns += Regexp.last_match[1].to_i
296
+ @new_patterns = Regexp.last_match[1].to_i
287
297
  elsif line =~ /New files:\s+(\d+)/
288
- stats.new_files += Regexp.last_match[1].to_i
298
+ @new_files = Regexp.last_match[1].to_i
289
299
  elsif line =~ /FAILED patterns:\s+(\d+)/
290
- stats.failed_patterns += Regexp.last_match[1].to_i
300
+ @failed_patterns = Regexp.last_match[1].to_i
291
301
  elsif line =~ /FAILED files:\s+(\d+)/
292
- stats.failed_files += Regexp.last_match[1].to_i
302
+ @failed_files = Regexp.last_match[1].to_i
293
303
  elsif line =~ /ERROR!/
294
304
  stats.errors += 1
295
305
  Origen.log.send :relog, line, options
@@ -318,6 +328,16 @@ module Origen
318
328
  end
319
329
  end
320
330
  end
331
+ stats.completed_patterns += @completed_patterns
332
+ stats.total_vectors += @total_vectors
333
+ stats.total_duration += @total_duration
334
+ stats.completed_files += @completed_files
335
+ stats.changed_patterns += @changed_patterns
336
+ stats.changed_files += @changed_files
337
+ stats.new_patterns += @new_patterns
338
+ stats.new_files += @new_files
339
+ stats.failed_patterns += @failed_patterns
340
+ stats.failed_files += @failed_files
321
341
  end
322
342
  Origen.log.send(log_method, '*' * 70)
323
343
  stats.print_summary
@@ -143,7 +143,7 @@ module Origen
143
143
  # rubocop:disable Style/RescueModifier
144
144
  record_invocation = Thread.new do
145
145
  Origen.client.record_invocation(options[:action]) if options[:action]
146
- rescue Errno::ECONNREFUSED
146
+ rescue
147
147
  # Dont allow server being down to flood the screen with the stacktrace
148
148
  end
149
149
  # rubocop:enable Style/RescueModifier
data/lib/origen/client.rb CHANGED
@@ -5,7 +5,7 @@ module Origen
5
5
  # https://github.com/jnunemaker/httparty/tree/v0.9.0
6
6
 
7
7
  require 'json'
8
- # require 'httparty'
8
+ require 'net/http'
9
9
  # include HTTParty
10
10
 
11
11
  USE_DEV_SERVER = false
@@ -13,7 +13,7 @@ module Origen
13
13
  }.merge(options)
14
14
 
15
15
  if File.exist?(old)
16
- if Utility::Diff.new(file_a: new, file_b: old, ignore_blank_lines: true,
16
+ if Utility::Diff.new(file_a: new, file_b: old, ignore_blank_lines: options[:ignore_blank_lines],
17
17
  comment_char: options[:comment_char],
18
18
  suspend_string: options[:suspend_string],
19
19
  resume_string: options[:resume_string]).diffs?
@@ -39,9 +39,10 @@ module Origen
39
39
  # to the destination un-altered
40
40
  def compile(file_or_dir, options = {})
41
41
  options = {
42
- check_for_changes: true,
43
- sub_template: false,
44
- collect_stats: true
42
+ check_for_changes: true,
43
+ sub_template: false,
44
+ collect_stats: true,
45
+ ignore_blank_lines: true
45
46
  }.merge(options)
46
47
  @scope = options[:scope]
47
48
  # Doing here so the output_directory (requiring target load) doesn't get hit if
@@ -130,7 +131,7 @@ module Origen
130
131
  if @check_for_changes
131
132
  check_for_changes(output_file(file, options), reference_file(file, options),
132
133
  comment_char: Origen.app.tester ? Origen.app.tester.program_comment_char : nil,
133
- compile_job: true)
134
+ compile_job: true, ignore_blank_lines: options[:ignore_blank_lines])
134
135
  end
135
136
  end
136
137
  end
data/lib/origen/loader.rb CHANGED
@@ -117,11 +117,23 @@ module Origen
117
117
  # If a block definition exists for the given model, then this will load it and apply it to
118
118
  # the model.
119
119
  # if options[:inherit] is passed, it will first try to load the files for the class name contained
120
- # in that option, even if its from a plugin app
120
+ # in that option, even if its from a plugin app. Additionally, any bugs/features will be inherited
121
+ # as well unless disable_bug_inheritance or disable_feature_inheritance options are passed
121
122
  # Returns true if a model is found and loaded, otherwise nil.
122
123
  def self.load_block(model, options = {})
123
124
  model = model.model # Ensure we have a handle on the model and not its controller
124
125
  loaded = nil
126
+
127
+ if options[:inherit]
128
+ # pass down any bugs/features from the inherited block class
129
+ unless options[:disable_bug_inheritance]
130
+ model.class.instance_variable_set(:@bugs, options[:inherit].constantize.bugs.merge(model.class.bugs))
131
+ end
132
+ unless options[:disable_feature_inheritance]
133
+ model.class.instance_variable_set(:@features, options[:inherit].constantize.features.merge(model.class.features))
134
+ end
135
+ end
136
+
125
137
  if local_app = options[:app] || model.app
126
138
  if options[:path]
127
139
  local_full_paths = Array(options[:path])
@@ -132,6 +144,7 @@ module Origen
132
144
  end
133
145
  app_paths_map = { local_app => local_full_paths }
134
146
  if options[:inherit]
147
+ # update app_paths_map with the relevant inherited files
135
148
  inherit_full_paths = options[:inherit].split('::')
136
149
  inherit_app = Origen.app(inherit_full_paths.shift.underscore.to_sym)
137
150
  inherit_full_paths = [inherit_full_paths.join('/')]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: origen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.60.3
4
+ version: 0.60.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen McGinty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-12 00:00:00.000000000 Z
11
+ date: 2022-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -749,7 +749,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
749
749
  - !ruby/object:Gem::Version
750
750
  version: 1.8.11
751
751
  requirements: []
752
- rubygems_version: 3.0.1
752
+ rubygems_version: 3.2.31
753
753
  signing_key:
754
754
  specification_version: 4
755
755
  summary: The Semiconductor Developer's Kit