コード例 #1
0
ファイル: test_xds110.py プロジェクト: jcao1022/tiflash
    def test_xds110_upgrade_error(self, t_env):
        """Calls xds110_upgrade on non existant device"""
        ccs_path = t_env['CCS_INSTALLS'][0]
        serno = "GARBAGE"

        with pytest.raises(XDS110Error):
            result = xds110_upgrade(ccs_path, serno=serno)
コード例 #2
0
ファイル: test_xds110.py プロジェクト: jcao1022/tiflash
    def test_xds110_upgrade_no_serno(self, t_env):
        """Calls xds110_upgrade with no serno"""
        ccs_path = t_env['CCS_INSTALLS'][0]

        result = xds110_upgrade(ccs_path)

        assert result == True
コード例 #3
0
ファイル: api.py プロジェクト: webbcam/tiflash
def xds110_upgrade(ccs=None, **session_args):
    """Upgrades/Flashes XDS110 firmware on board.

    Firmware flashed is found in xds110 directory (firmware.bin). This function
    uses the 'xdsdfu' executable to put device in DFU mode. Then performs the
    flash + reset functions of xdsdfu to flash the firmware.bin image

    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 successful

    Raises:
        XDS110Error: raises if xds110 firmware update 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_upgrade")

    return xds110.xds110_upgrade(ccs_path, serno=ccxml_args['serno'])
コード例 #4
0
ファイル: test_xds110.py プロジェクト: webbcam/tiflash
    def test_xds110_upgrade_no_serno(self, tenv):
        """Calls xds110_upgrade with no serno"""
        ccs_path = tenv['paths']['ccs']

        result = xds110_upgrade(ccs_path)

        assert result == True
コード例 #5
0
ファイル: test_xds110.py プロジェクト: jcao1022/tiflash
    def test_xds110_upgrade(self, t_env):
        """Calls xds110_upgrade 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_upgrade(ccs_path, serno=device['serno'])

        assert result == True
コード例 #6
0
ファイル: test_xds110.py プロジェクト: webbcam/tiflash
    def test_xds110_upgrade(self, tenv):
        """Calls xds110_upgrade 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_upgrade(ccs_path, serno=device['serno'])

        assert result == True