forked from Mirror/pmbootstrap
core: chroot: Deduplicate supported arch list (MR 2476)
self.arch is a property and calls Arch.from_str, which errors upon encountering an unknown architecture. Therefore, the error message is changed and needs to be adjusted in the tests. Since Arch.supported is a set, error messages were not deterministic before, so we need to sort the list of architectures now. Signed-off-by: Jens Reidel <adrian@travitia.xyz>
This commit is contained in:
parent
6d72043ac2
commit
9ca0ada582
3 changed files with 6 additions and 12 deletions
|
@ -42,7 +42,10 @@ def test_invalid_chroots(pmb_args):
|
|||
|
||||
with pytest.raises(ValueError) as excinfo:
|
||||
Chroot(ChrootType.BUILDROOT, "BAD_ARCH")
|
||||
assert str(excinfo.value) == "Invalid buildroot suffix: 'BAD_ARCH'"
|
||||
assert (
|
||||
str(excinfo.value)
|
||||
== "Invalid architecture: 'BAD_ARCH', expected something like: aarch64, armhf, armv7, riscv64, x86, x86_64"
|
||||
)
|
||||
|
||||
with pytest.raises(ValueError) as excinfo:
|
||||
Chroot(ChrootType.NATIVE, "aarch64")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue