I plan to iterate around many attributes of the $dut model and various test conditions in my test program. I was testing out a very simple flow and am getting an error regarding duplicate test IDs.
Flow.create do |options|
[:pmin, :pmax].each do |cond|
bist :mbist, ip: :cpu, testmode: :hr, cond: cond, id: :hr
end
end
Here is the error:
[ERROR] 64.198[0.193] || Test ID hr_965EA18 is defined more than once in flow ws1:
[ERROR] 64.199[0.001] || /users/user/origen/ppekit/program/components/_bist.rb:4
[ERROR] 64.199[0.000] || /users/user/origen/ppekit/program/components/_bist.rb:4
I guess I would expect this to work but when I checked out the test program generator docs I didn't see an example of loops, only conditionals. I do see the concept of re-useable flow snippets but that seems to work best for a repeatable sequence of tests, versus just iterating ad-hoc.
regards
Your code expands to this:
Which means you have two tests with the ID
:hr
, which is not allowed as IDs must be unique.Either consider if you really need the ID, you probably don't unless you are referring to this test in a conditional execution relationship with another test, or else update your code to generate unique IDs: