Exemplo n.º 1
0
    def test_xds110_reset_error(self, t_env):
        """Calls xds110_reset on non existant device"""
        ccs_path = t_env['CCS_INSTALLS'][0]
        serno = "GARBAGE"

        with pytest.raises(XDS110Error):
            result = xds110_reset(ccs_path, serno=serno)
Exemplo n.º 2
0
    def test_xds110_reset_no_serno(self, t_env):
        """Calls xds110_reset with no serno"""
        ccs_path = t_env['CCS_INSTALLS'][0]

        result = xds110_reset(ccs_path)

        assert result == True
Exemplo n.º 3
0
    def test_xds110_reset_no_serno(self, tenv):
        """Calls xds110_reset with no serno"""
        ccs_path = tenv['paths']['ccs']

        result = xds110_reset(ccs_path)

        assert result == True
Exemplo n.º 4
0
    def test_xds110_reset_serno(self, t_env):
        """Calls xds110_reset with serno"""
        ccs_path = t_env['CCS_INSTALLS'][0]
        devices = list(t_env['DEVICES'].keys())
        device = t_env['DEVICES'][devices[0]]

        if len(devices) == 0:
            pytest.skip("Need devices connected to test xds110_reset serno on")

        result = xds110_reset(ccs_path, serno=device['serno'])

        assert result == True
Exemplo n.º 5
0
    def test_xds110_reset_serno(self, tenv):
        """Calls xds110_reset with serno"""
        ccs_path = tenv['paths']['ccs']
        devices = tenv['devices']
        device = tenv[devices[0]]

        if len(devices) == 0:
            pytest.skip("Need devices connected to test xds110_reset serno on")

        result = xds110_reset(ccs_path, serno=device['serno'])

        assert result == True
Exemplo n.º 6
0
def xds110_reset(ccs=None, **session_args):
    """Calls xds110reset command on specified serno.

    Args:
        ccs (str): version number of CCS to use or path to custom installation
        session_args (**dict): keyword arguments containing settings for
            the device connection

    Returns:
        bool: True if xds110reset was successful

    Raises:
        TIFlashError: raises if serno not set
        XDS110Error: raises if xds110_reset fails
    """
    ccs_path = __handle_ccs(ccs)

    ccxml_args = __handle_ccxml_args(ccs_path, **session_args)

    if ccxml_args['serno'] is None:
        raise TIFlashError("Must provide 'serno' to call xds110_reset")

    return xds110.xds110_reset(ccs_path, serno=ccxml_args['serno'])