nimi-python icon indicating copy to clipboard operation
nimi-python copied to clipboard

In nidigital, History RAM system tests cannot be run on simulated session

Open sbethur opened this issue 5 years ago • 3 comments

Description of issue

nidigital python API contains fancy HRAM method. Digital driver does not simulate HRAM functions in the C API "well enough", to allow testing of the fancy HRAM method. During development of fancy HRAM method, the system tests were run on real h/w. But these tests are disabled on the nimi-bot runs.

We need to re-enable the tests by doing one of the following:

  1. Mock the C entry points
  2. Improve the simulation in C API
  3. Use real h/w to run tests in CI
  4. Something else

sbethur avatar Feb 13 '20 20:02 sbethur

The fact that simulation is deficient should be considered a driver bug. Please report that in the internal bug tracking system and post the number here.

I wouldn't mock the C API (in other words the _Library class). Through nifake we validate that the logic from the generator is correct. If you want to test the "fancy" handcoded function then mocking the private nidigital.Session methods it calls into is the right thing to do.

marcoskirsch avatar Mar 20 '20 20:03 marcoskirsch

Created a bug in internal bug tracking system, number is 992370.

sbethur avatar Mar 20 '20 22:03 sbethur

This bug is about running the tests in simulation. It was closed by covering this code via unit testing. I think that's the workaround but this bug should remain open until driver bug 992370 is fixed and then these unit tests replaced with regular system tests.

marcoskirsch avatar Apr 10 '20 02:04 marcoskirsch