Commit f13ada9a authored by Tristan Gingold's avatar Tristan Gingold

Re-allow and test for no top level.

parent 4470b376
......@@ -67,7 +67,7 @@ class Action(list):
raise Exception("'sim_tool' variable is not defined")
self.tool = load_sim_tool(tool)
self.top_entity = self.config.get("sim_top") \
or self.config["top_module"]
or self.config.get("top_module")
self.config["sim_top"] = self.top_entity
elif action == "synthesis":
tool = self.config.get("syn_tool")
......@@ -75,7 +75,7 @@ class Action(list):
raise Exception("'syn_tool' variable is not defined")
self.tool = load_syn_tool(tool)
self.top_entity = self.config.get("syn_top") \
or self.config["top_module"]
or self.config.get("top_module")
self.config["syn_top"] = self.top_entity
else:
raise Exception("Unknown requested action: {}".format(action))
......
action = "simulation"
sim_tool="modelsim"
files = [ "../files/gate.vhdl" ]
......@@ -372,6 +372,10 @@ def test_err_noaction():
def test_all_files():
run(['-a', 'makefile'], path="002msim")
def test_err_notop():
with pytest.raises(SystemExit) as _:
run([], path="066err_top")
@pytest.mark.xfail
def test_xfail():
"""This is a self-consistency test: the test is known to fail"""
......
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