예제 #1
0
def test_config_cmpa():
    cmpa = CMPA('lpc55s6x')
    config = cmpa.generate_config()
    config2 = cmpa.generate_config(exclude_computed=False)

    assert config != config2

    cmpa2 = CMPA('lpc55s6x', user_config=config2)
    out = cmpa2.parse(bytes(512), exclude_computed=False)

    assert out == config2
예제 #2
0
파일: test_pfr.py 프로젝트: mstarecek/spsdk
def test_config_cmpa():
    """Test PFR tool - Test CMPA configuration."""
    cmpa = CMPA("lpc55s6x")
    config = cmpa.generate_config()
    config2 = cmpa.generate_config(exclude_computed=False)

    assert config != config2

    cmpa2 = CMPA("lpc55s6x", user_config=PfrConfiguration(config2))
    cmpa2.parse(bytes(512))
    out = cmpa2.get_yaml_config(exclude_computed=False)

    assert out == config2
예제 #3
0
파일: test_pfr.py 프로젝트: mstarecek/spsdk
def test_get_bitfields_ignore():
    """Test invalid case for computed filed handler."""
    cmpa = CMPA(device="lpc55s6x")
    cmpa.config.config.pop("ignored_fields", None)
    assert cmpa.generate_config()