Skip to content

Conversation

@Fladolcetta
Copy link
Contributor

@Fladolcetta Fladolcetta commented Sep 8, 2017

[x ] This contribution adheres to [CONTRIBUTING.md]

What does this Pull Request accomplish?

Re-adds the system test that was crashing nimi-bot (system test machine).
The system test has been modified to disable reset which worked as a workaround. This appears to be an internal NI-SWITCH bug with DAQmx based devices. Filed as NI internal bug 666018.

Why should this Pull Request be merged?

Fixes #268
Improves test coverage.

What testing has been done?

Ran system tests, verified system test machine test passed

@marcoskirsch
Copy link
Member

So we don't know why this was crashing in the first place? It just went away on its own?

@marcoskirsch
Copy link
Member

So from details posted by mimi-bot above:

================================== FAILURES ===================================
_____________________________ test_enum_attribute _____________________________

    def test_enum_attribute():
>       with niswitch.Session('', False, True, 'Simulate=1, DriverSetup=topology:2532/1-Wire 4x128 Matrix') as session:

bin\niswitch\system_tests\test_system_niswitch.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.tox\system_tests\lib\site-packages\niswitch\session.py:907: in __init__
    self.vi = self._init_with_options(resource_name, id_query, reset_device, options_string)
.tox\system_tests\lib\site-packages\niswitch\session.py:1875: in _init_with_options
    error_code = self.library.niSwitch_InitWithOptions(resource_name.encode('ascii'), id_query, reset_device, options_string.encode('ascii'), ctypes.pointer(vi_ctype))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <niswitch.library.Library object at 0x00000219D027AE80>
resource_name = b'', id_query = False, reset_device = True
options_string = b'Simulate=1, DriverSetup=topology:2532/1-Wire 4x128 Matrix'
vi = <niswitch.session.LP_ViSession_ctype object at 0x00000219D02D6BC8>

    def niSwitch_InitWithOptions(self, resource_name, id_query, reset_device, options_string, vi):  # noqa: N802
        with self._func_lock:
            if self.niSwitch_InitWithOptions_cfunc is None:
                self.niSwitch_InitWithOptions_cfunc = self._library.niSwitch_InitWithOptions
                self.niSwitch_InitWithOptions_cfunc.argtypes = [ViRsrc_ctype, ViBoolean_ctype, ViBoolean_ctype, ViConstString_ctype, ctypes.POINTER(ViSession_ctype)]  # noqa: F405
                self.niSwitch_InitWithOptions_cfunc.restype = niswitch.python_types.ViStatus
>       return self.niSwitch_InitWithOptions_cfunc(resource_name, id_query, reset_device, options_string, vi)
E       OSError: exception: access violation reading 0x0000000000000000

.tox\system_tests\lib\site-packages\niswitch\library.py:296: OSError
===================== 1 failed, 21 passed in 5.32 seconds =====================
ERROR: InvocationError: 'C:\\Jenkins\\workspace\\nimi_python_system_tests\\.tox\\system_tests\\Scripts\\coverage.EXE run --append --source niswitch -m py.test bin/niswitch/system_tests'
___________________________________ summary ___________________________________
ERROR:   system_tests: commands failed

@Fladolcetta Fladolcetta changed the title Updating system tests Updating system tests to re-add the enum attribute test Sep 8, 2017
@marcoskirsch
Copy link
Member

Rewrite the PR description please, it's now stale. This is working around a bug. Add a link to the NI Internal bug report too.

@marcoskirsch marcoskirsch merged commit 753a2c2 into master Sep 14, 2017
@Fladolcetta Fladolcetta changed the title Updating system tests to re-add the enum attribute test Updating NI-SWITCH system tests to re-add the enum attribute test Sep 14, 2017
@Fladolcetta Fladolcetta deleted the bug/bug268 branch September 14, 2017 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants