-
Notifications
You must be signed in to change notification settings - Fork 194
/
Copy pathtest_questa_formal.py
38 lines (28 loc) · 1.05 KB
/
test_questa_formal.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
36
37
38
import filecmp
import os
from .edalize_common import make_edalize_test, tests_dir
def test_questa_formal(make_edalize_test):
tool_options = {
"vcom_options": ["various", "vcom_options"],
"vlog_options": ["some", "vlog_options"],
"qverify_options": ["a", "few", "qverify_options"],
"autocheck_options": ["a", "few", "autocheck_options"],
}
# FIXME: Add VPI tests
tf = make_edalize_test("questaformal", tool_options=tool_options)
tf.backend.configure()
tf.compare_files(["Makefile", "edalize_build_rtl.tcl", "edalize_main.tcl"])
orig_env = os.environ.copy()
try:
# os.environ["MODEL_TECH"] = os.path.join(tests_dir, "mock_commands")
tf.backend.build()
os.makedirs(os.path.join(tf.work_root, "work"))
tf.compare_files(["qverify.cmd"])
tf.backend.run()
assert filecmp.cmp(
os.path.join(tf.ref_dir, "qverify2.cmd"),
os.path.join(tf.work_root, "qverify.cmd"),
shallow=False,
)
finally:
os.environ = orig_env