Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nidcpower system tests test_lcr_custom_cable_compensation_data, test_lcr_compensation_data should be re-enabled to run NI-DCPower 23.5 driver runtime #1908

Closed
ni-jfitzger opened this issue Apr 6, 2023 · 3 comments · Fixed by #2046

Comments

@ni-jfitzger
Copy link
Collaborator

Description of issue

The system test test_lcr_custom_cable_compensation_data fails with the latest NI-DCPower driver runtime (23.3).

From a manual run:

self = <test_system_nidcpower.TestLibrary object at 0x000002937DC0E410>
session = nidcpower.Session(resource_name='4190/0', channels='', reset=False, options='Simulate=1, DriverSetup=Model:4190; BoardType:PXIe', independent_channels=True)

    @pytest.mark.resource_name("4190/0")
    @pytest.mark.options("Simulate=1, DriverSetup=Model:4190; BoardType:PXIe")
    def test_lcr_custom_cable_compensation_data(self, session):
        compensation_data = session.get_lcr_custom_cable_compensation_data()
>       session.configure_lcr_custom_cable_compensation(compensation_data)

src\nidcpower\system_tests\test_system_nidcpower.py:1055:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pytest_env\lib\site-packages\nidcpower\session.py:42: in aux
    return f(*xs, **kws)
pytest_env\lib\site-packages\nidcpower\session.py:4542: in configure_lcr_custom_cable_compensation
    self._interpreter.configure_lcr_custom_cable_compensation(self._repeated_capability, custom_cable_compensation_data)
pytest_env\lib\site-packages\nidcpower\_library_interpreter.py:151: in configure_lcr_custom_cable_compensation
    errors.handle_error(self, error_code, ignore_warnings=False, is_error_handling=False)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

library_interpreter = <nidcpower._library_interpreter.LibraryInterpreter object at 0x00000293000D6CB0>, code = -1074118449, ignore_warnings = False, is_error_handling = False

    def handle_error(library_interpreter, code, ignore_warnings, is_error_handling):
        '''handle_error

        Helper function for handling errors returned by nidcpower.Library.
        It calls back into the LibraryInterpreter to get the corresponding error
        description and raises if necessary.
        '''

        if _is_success(code) or (_is_warning(code) and ignore_warnings):
            return

        if is_error_handling:
            # The caller is in the midst of error handling and an error occurred.
            # Don't try to get the description or we'll start recursing until the stack overflows.
            description = ''
        else:
            description = library_interpreter.get_error_description(code)

        if _is_error(code):
>           raise DriverError(code, description)
E           nidcpower.errors.DriverError: -1074118449: The provided compensation data is invalid. Provide a valid buffer or call niDCPower_GetLCRCompensationData to retrieve a valid set of cable compensation data.
E
E           Device: 4190/0

Steps to reproduce issue

Run nidcpower system tests with NI-DCPower 23.3 Driver Runtime.

@ni-jfitzger
Copy link
Collaborator Author

ni-jfitzger commented Apr 6, 2023

This is due to changes in the driver runtime. Previously, configure_lcr_custom_cable_compensation and configure_lcr_compensation were NOOPs with simulated devices. Now, they validate the compensation data that gets passed in, but get_lcr_compensation_data and get_lcr_custom_cable_compensation_data still NOOP with simulated devices, so we are not passing in valid data.

The change was intentional.

@ni-jfitzger
Copy link
Collaborator Author

We have decided to temporarily disable tests that call configure_lcr_custom_cable_compensation and configure_lcr_compensation until we have a way to call them with a simulated session and not error.

I am kicking this out to the next milestone.

@ni-jfitzger
Copy link
Collaborator Author

In the NI-DCPower 23.5 driver runtime, we have a fix that will allow us to run the failing tests again. We should re-enable them. I will update the title of this issue.

@ni-jfitzger ni-jfitzger changed the title nidcpower system test test_lcr_custom_cable_compensation_data fails with latest NI-DCPower driver runtime nidcpower system tests test_lcr_custom_cable_compensation_data, test_lcr_compensation_data should be re-enabled to run NI-DCPower 23.5 driver runtime Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant