Example #1
0
def test_virtualprobe_init():
    with pytest.raises(DebugProbeError):
        vp = DebugProbeVirtual("ID", {"exc": None})

    vp = DebugProbeVirtual(
        "ID", {
            "subs_ap": '{"0":[1,2]}',
            "subs_dp": '{"0":[1,2]}',
            "subs_mem": '{"0":[1,2]}'
        })
    assert vp.coresight_ap_substituted == {0: [2, 1]}
    assert vp.coresight_dp_substituted == {0: [2, 1]}
    assert vp.virtual_memory_substituted == {0: [2, 1]}
    vp.clear(True)
    vp.clear(False)
Example #2
0
def test_virtualprobe_init():
    """Test of virtual Debug Probe - Initialization."""
    with pytest.raises(SPSDKDebugProbeError):
        virtual_probe = DebugProbeVirtual("ID", {"exc": None})

    virtual_probe = DebugProbeVirtual(
        "ID", {
            "subs_ap": '{"0":[1,2]}',
            "subs_dp": '{"0":[1,2]}',
            "subs_mem": '{"0":[1,2]}'
        })
    assert virtual_probe.coresight_ap_substituted == {0: [2, 1]}
    assert virtual_probe.coresight_dp_substituted == {0: [2, 1]}
    assert virtual_probe.virtual_memory_substituted == {0: [2, 1]}
    virtual_probe.clear(True)
    virtual_probe.clear(False)