Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ include = ["fusesoc", "fusesoc.capi2", "fusesoc.provider", "fusesoc.parser", "fu
[project.scripts]
fusesoc = "fusesoc.main:main"

[tool.pytest.ini_options]
markers = [
"network: test requires network access.",
]

[tool.tox]
legacy_tox_ini = """
[tox]
Expand Down
1 change: 1 addition & 0 deletions tests/test_coremanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def test_copyto():
assert os.path.exists(os.path.join(work_root, "copytodot"))


@pytest.mark.network
def test_export():
import os
import tempfile
Expand Down
4 changes: 4 additions & 0 deletions tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import tempfile
from argparse import Namespace

import pytest
from test_common import cache_root, cores_root, library_root

from fusesoc.config import Config
Expand Down Expand Up @@ -56,6 +57,7 @@ def test_library_location():
fs.get_core("atlys")


@pytest.mark.network
def test_library_add(caplog):
import tempfile

Expand Down Expand Up @@ -151,6 +153,7 @@ def test_library_add(caplog):
tcf.close()


@pytest.mark.network
def test_library_update(caplog):

clone_target = tempfile.mkdtemp()
Expand Down Expand Up @@ -210,6 +213,7 @@ def test_library_update(caplog):
assert "test_lib : sync-type is local. Ignoring update" in caplog.text


@pytest.mark.network
def test_library_update_with_initialize(caplog):
with tempfile.TemporaryDirectory() as library:

Expand Down
3 changes: 3 additions & 0 deletions tests/test_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
cores_root = os.path.join(tests_dir, "cores")


@pytest.mark.network
def test_git_provider():
cache_root = tempfile.mkdtemp("git_")
core = Core(
Expand All @@ -33,6 +34,7 @@ def test_git_provider():
assert os.path.isfile(os.path.join(core.files_root, f))


@pytest.mark.network
def test_github_provider():
cache_root = tempfile.mkdtemp("github_")
core = Core(
Expand Down Expand Up @@ -87,6 +89,7 @@ def test_opencores_provider():
assert os.path.isfile(os.path.join(core.files_root, "tap_top.v"))


@pytest.mark.network
def test_url_provider():
cores_root = os.path.join(tests_dir, "capi2_cores", "providers")

Expand Down
2 changes: 2 additions & 0 deletions tests/test_usecases.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from fusesoc.main import main


@pytest.mark.network
def test_git_library_with_default_branch_is_added_and_updated(caplog):
_fusesoc("library", "add", "https://github.com/fusesoc/fusesoc-generators")
assert "Cloning library into fusesoc_libraries/fusesoc-generators" in caplog.text
Expand All @@ -32,6 +33,7 @@ def test_git_library_with_default_branch_is_added_and_updated(caplog):
assert "Updating..." in caplog.text


@pytest.mark.network
def test_update_git_library_with_fixed_version(caplog, capsys):
"""
Previously, one could not successfully use `fusesoc library update` on
Expand Down
Loading