Skip to content
Closed
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
10 changes: 9 additions & 1 deletion test/unit/test_argparse.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from tuxrun.argparse import setup_parser
from tuxrun.argparse import filter_artefacts, setup_parser


def test_timeouts_parser():
Expand All @@ -14,3 +14,11 @@ def test_timeouts_parser():

with pytest.raises(SystemExit):
setup_parser().parse_args(["--timeouts", "booting=1"])


def test_uboot_argument():
options = setup_parser().parse_args(
["--device", "qemu-arm64", "--uboot", "https://example.com/u-boot.bin"]
)
assert options.uboot == "https://example.com/u-boot.bin"
assert filter_artefacts(options)["uboot"] == "https://example.com/u-boot.bin"
2 changes: 2 additions & 0 deletions tuxrun/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def run(options, tmpdir: Path, cache_dir: Optional[Path], artefacts: dict) -> in
"tmpdir": tmpdir,
"tuxbuild": options.tuxbuild,
"tuxmake": options.tuxmake,
"uboot": options.uboot,
"uefi": options.uefi,
}
job = Job(**def_arguments)
Expand Down Expand Up @@ -297,6 +298,7 @@ def run(options, tmpdir: Path, cache_dir: Optional[Path], artefacts: dict) -> in
job.scp_fw,
job.scp_romfw,
job.ssh_identity_file,
job.uboot,
job.uefi,
] + extra_assets:
ro = True
Expand Down
2 changes: 2 additions & 0 deletions tuxrun/argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def filter_artefacts(options):
"rootfs",
"scp-fw",
"scp-romfw",
"uboot",
"uefi",
]
return {k: getattr(options, k) for k in vars(options) if k in keys}
Expand Down Expand Up @@ -288,6 +289,7 @@ def artefact(name):
help="directory containing a TuxMake build",
)
artefact("test-definitions")
artefact("uboot")
artefact("uefi")
group.add_argument(
"--fvp-ubl-license",
Expand Down
Loading