-
Notifications
You must be signed in to change notification settings - Fork 198
/
Copy pathtest_vpr.py
35 lines (30 loc) · 948 Bytes
/
test_vpr.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
import pytest
from .edalize_common import make_edalize_test
@pytest.mark.parametrize("params", [("minimal", "vpr")])
def test_vpr(params, tmpdir):
import os
from .edalize_common import compare_files, get_flow, tests_dir
test_name = "vpr"
os.environ["PATH"] = (
os.path.join(tests_dir, "mock_commands") + ":" + os.environ["PATH"]
)
tool = "vpr"
name = "test_vpr_{}_0".format(test_name)
work_root = str(tmpdir)
edam = {
"name": name,
"flow_options": {
"arch": "xilinx",
"arch_xml": "/tmp/k6_N10_mem32K_40nm.xml",
"vpr_options": [],
},
}
vpr_flow = get_flow("vpr")
vpr_backend = vpr_flow(edam=edam, work_root=work_root)
vpr_backend.configure()
config_file_list = [
"Makefile",
]
ref_dir = os.path.join(tests_dir, "test_" + tool, test_name)
compare_files(ref_dir, work_root, config_file_list)