Commit d8e64fa3 authored by Tristan Gingold's avatar Tristan Gingold

tests: strenghten 009icestorm

parent 694c7b6b
......@@ -7,7 +7,6 @@ TOP_MODULE := gate2
PWD := $(shell pwd)
PROJECT := gate2
PROJECT_FILE := $(PROJECT).
TOOL_PATH :=
TCL_INTERPRETER := yosys -c
ifneq ($(strip $(TOOL_PATH)),)
TCL_INTERPRETER := $(TOOL_PATH)/$(TCL_INTERPRETER)
......
......@@ -36,14 +36,17 @@ def compare_makefile():
assert out == ref
os.remove('Makefile')
def compare_makefile_xilinx():
def compare_makefile_filter(start):
ref = open('Makefile.ref', 'r').readlines()
out = open('Makefile', 'r').readlines()
# HDLmake make the path absolute. Remove this line.
out = [l for l in out if not l.startswith("XILINX_INI_PATH")]
out = [l for l in out if not l.startswith(start)]
assert out == ref
os.remove('Makefile')
def compare_makefile_xilinx():
# HDLmake make the path absolute. Remove this line.
compare_makefile_filter("XILINX_INI_PATH")
def run_compare(**kwargs):
with Config(**kwargs) as _:
hdlmake.main.hdlmake([])
......@@ -100,7 +103,9 @@ def test_ghdl():
run_compare(path="008ghdl")
def test_icestorm():
run_compare(path="009icestorm")
with Config(path="009icestorm") as _:
hdlmake.main.hdlmake([])
compare_makefile_filter("TOOL_PATH")
def test_isim():
with Config(path="010isim") as _:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment