Skip to content

Commit ac14c0a

Browse files
Workarounds to pass smoke test due to use of Mock classes. Will make a better fix in next PR where the Design class was created.
1 parent 463a864 commit ac14c0a

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

lib/arch_obj_models/certificate.rb

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,16 @@ class CertModel < Portfolio
2626
def initialize(obj_yaml, yaml_path, arch: nil)
2727
super # Calls parent class with the same args I got
2828

29-
unless arch.is_a?(ConfiguredArchitecture)
29+
# TODO: XXX: Don't allow Architecture class.
30+
# See https://github.com/riscv-software-src/riscv-unified-db/pull/371
31+
unless arch.is_a?(ConfiguredArchitecture) || arch.is_a?(Architecture)
3032
raise ArgumentError, "For #{name} arch is a #{arch.class} but must be a ConfiguredArchitecture"
3133
end
3234

33-
puts "UPDATE: Creating CertModel object for #{name} using cfg #{cfg_arch.name}"
35+
# TODO: XXX: Add back in arch.name.
36+
# See https://github.com/riscv-software-src/riscv-unified-db/pull/371
37+
#puts "UPDATE: Creating CertModel object for #{name} using cfg #{cfg_arch.name}"
38+
puts "UPDATE: Creating CertModel object for #{name}"
3439
end
3540

3641
def unpriv_isa_manual_revision = @data["unpriv_isa_manual_revision"]

lib/idl/symbol_table.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ def hash
9191

9292
def initialize(cfg_arch)
9393
raise "Must provide cfg_arch" if cfg_arch.nil?
94-
raise "The cfg_arch must be a ConfiguredArchitecture but is a #{cfg_arch.class}" unless cfg_arch.is_a?(ConfiguredArchitecture)
94+
# TODO: XXX: Put this check back in when replaced by Design class.
95+
# See https://github.com/riscv-software-src/riscv-unified-db/pull/371
96+
#raise "The cfg_arch must be a ConfiguredArchitecture but is a #{cfg_arch.class}" unless (cfg_arch.is_a?(ConfiguredArchitecture) || cfg_arch.is_a?(MockConfiguredArchitecture))
9597

9698
@cfg_arch = cfg_arch
9799
@mxlen = cfg_arch.unconfigured? ? nil : cfg_arch.mxlen

0 commit comments

Comments
 (0)