-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added warnings for zero test, except for when doing --compile. Closes #…
…99.
- Loading branch information
Showing
5 changed files
with
56 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
# You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# | ||
# Copyright (c) 2015, Lars Asplund [email protected] | ||
# Copyright (c) 2015-2016, Lars Asplund [email protected] | ||
|
||
""" | ||
Verify that all external run scripts work correctly | ||
|
@@ -37,10 +37,10 @@ def test_verilog_uart_example_project(self): | |
self.check(join(ROOT, "examples", "verilog", "uart", "run.py")) | ||
|
||
def test_vhdl_logging_example_project(self): | ||
self.check(join(ROOT, "examples", "vhdl", "logging", "compile.py")) | ||
self.check(join(ROOT, "examples", "vhdl", "logging", "compile.py"), args=["--compile"]) | ||
|
||
def test_vhdl_check_example_project(self): | ||
self.check(join(ROOT, "examples", "vhdl", "check", "compile.py")) | ||
self.check(join(ROOT, "examples", "vhdl", "check", "compile.py"), args=["--compile"]) | ||
|
||
def test_vhdl_generate_tests_example_project(self): | ||
self.check(join(ROOT, "examples", "vhdl", "generate_tests", "run.py")) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
# You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# | ||
# Copyright (c) 2014-2015, Lars Asplund [email protected] | ||
# Copyright (c) 2014-2016, Lars Asplund [email protected] | ||
|
||
""" | ||
Functionality to handle lists of test suites and filtering of them | ||
|
@@ -35,6 +35,15 @@ def keep_matches(self, test_filter): | |
self._test_suites = [test for test in self._test_suites | ||
if test.keep_matches(test_filter)] | ||
|
||
def num_tests(self): | ||
""" | ||
Return the number of tests within | ||
""" | ||
num_tests = 0 | ||
for test_suite in self: | ||
num_tests += len(test_suite.test_cases) | ||
return num_tests | ||
|
||
def __iter__(self): | ||
return iter(self._test_suites) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# License, v. 2.0. If a copy of the MPL was not distributed with this file, | ||
# You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# | ||
# Copyright (c) 2014-2015, Lars Asplund [email protected] | ||
# Copyright (c) 2014-2016, Lars Asplund [email protected] | ||
|
||
""" | ||
Functionality to automatically create test suites from a project | ||
|
@@ -269,7 +269,10 @@ def find_pragmas(self, code, file_name): | |
|
||
|
||
def tb_filter(entity): | ||
""" Filter entities with file name tb_* and entity_name tb_* """ | ||
""" | ||
Filters entities with both file name and entity name matching tb_* or *_tb. | ||
""" | ||
# Above docstring can show up in ui.py warnings | ||
file_ok = basename(entity.file_name).startswith("tb_") or splitext(basename(entity.file_name))[0].endswith("_tb") | ||
entity_ok = entity.name.startswith("tb_") or entity.name.endswith("_tb") | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters