| 12345678910111213141516 |
- from pathlib import Path
- import pytest
- from tools.target_registry import resolve_target,load_source_closure,TargetError
- from tools.fw_targets import load_source_closure as load_path_closure
- def test_both_closure_adapters_use_actual_current_sources():
- for name in ('6400','mrdimm'):
- target=resolve_target(name)
- sources=load_source_closure(target)
- assert sources==load_path_closure(target.source_closure,target.project_id)
- assert not any('/legacy/' in path or 'door_percent' in path for path in sources)
- assert ('src/motor/motor_engine.v' in sources)==(name=='mrdimm')
- assert Path(target.raw['top_file']).name==target.top_module+'.v'
- def test_retired_product_is_not_silently_reinterpreted():
- with pytest.raises(TargetError):resolve_target('prod2u-door-temp')
|