invoke/poetry: updated version in toml file and added invoke commands
This commit is contained in:
parent
3949bd6d1b
commit
fb21909dad
2 changed files with 46 additions and 8 deletions
|
@ -1,6 +1,6 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "core"
|
name = "core"
|
||||||
version = "6.4.0"
|
version = "6.6.0"
|
||||||
description = ""
|
description = ""
|
||||||
authors = []
|
authors = []
|
||||||
|
|
||||||
|
|
46
tasks.py
46
tasks.py
|
@ -2,13 +2,51 @@ from invoke import task
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def core(c):
|
def daemon(c):
|
||||||
|
"""
|
||||||
|
Runs core-daemon.
|
||||||
|
"""
|
||||||
|
with c.cd("daemon"):
|
||||||
|
poetry = c.run("which poetry").stdout.strip()
|
||||||
c.run(
|
c.run(
|
||||||
"poetry run sudo python3 scripts/core-daemon "
|
f"sudo {poetry} run scripts/core-daemon "
|
||||||
"-f data/core.conf -l data/logging.conf"
|
"-f data/core.conf -l data/logging.conf"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@task
|
@task
|
||||||
def core_pygui(c):
|
def gui(c):
|
||||||
c.run("poetry run python3 scripts/core-pygui")
|
"""
|
||||||
|
Run core-pygui.
|
||||||
|
"""
|
||||||
|
with c.cd("daemon"):
|
||||||
|
c.run("poetry run scripts/core-pygui")
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def test(c):
|
||||||
|
"""
|
||||||
|
Run core tests.
|
||||||
|
"""
|
||||||
|
with c.cd("daemon"):
|
||||||
|
poetry = c.run("which poetry").stdout.strip()
|
||||||
|
c.run(f"sudo {poetry} run pytest -v --lf -x tests", pty=True)
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def test_mock(c):
|
||||||
|
"""
|
||||||
|
Run core tests using mock to avoid running as sudo.
|
||||||
|
"""
|
||||||
|
with c.cd("daemon"):
|
||||||
|
c.run("poetry run pytest -v --mock --lf -x tests", pty=True)
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def test_emane(c):
|
||||||
|
"""
|
||||||
|
Run core emane tests.
|
||||||
|
"""
|
||||||
|
with c.cd("daemon"):
|
||||||
|
poetry = c.run("which poetry").stdout.strip()
|
||||||
|
c.run(f"sudo {poetry} run pytest -v --lf -x tests/emane", pty=True)
|
||||||
|
|
Loading…
Reference in a new issue