-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #352 from zapta/develop
Added an apio test command.
- Loading branch information
Showing
6 changed files
with
230 additions
and
61 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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# -*- coding: utf-8 -*- | ||
# -- This file is part of the Apio project | ||
# -- (C) 2016-2019 FPGAwars | ||
# -- Author Jesús Arroyo | ||
# -- Licence GPLv2 | ||
"""TODO""" | ||
|
||
import click | ||
from apio.managers.scons import SCons | ||
|
||
|
||
@click.command("test") | ||
@click.pass_context | ||
@click.option( | ||
"-p", | ||
"--project-dir", | ||
type=str, | ||
metavar="path", | ||
help="Set the target directory for the project.", | ||
) | ||
@click.option( | ||
"-t", | ||
"--testbench", | ||
type=str, | ||
metavar="testbench", | ||
help="Test only this testbench file.", | ||
) | ||
def cli(ctx, project_dir, testbench): | ||
"""Launch the verilog testbench testing.""" | ||
|
||
exit_code = SCons(project_dir).test({"testbench": testbench}) | ||
ctx.exit(exit_code) |
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
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
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from apio.commands.sim import cli as cmd_test | ||
|
||
|
||
def test_test(clirunner, configenv): | ||
with clirunner.isolated_filesystem(): | ||
configenv() | ||
result = clirunner.invoke(cmd_test, ['--board', 'icezum']) | ||
assert result.exit_code != 0 | ||
if result.exit_code == 1: | ||
assert 'apio install iverilog' in result.output |