3
0
Fork 0
forked from mirrors/nixpkgs

dockerTools: Add cross compilation test

This commit is contained in:
adisbladis 2020-11-19 18:12:36 +01:00
parent 5357abf49a
commit 11367b2db1
No known key found for this signature in database
GPG key ID: 110BFAD44C6249B7

View file

@ -234,5 +234,17 @@ import ./make-test-python.nix ({ pkgs, ... }: {
"docker run --rm file-in-store nix-store --verify --check-contents",
"docker run --rm file-in-store |& grep 'some data'",
)
with subtest("Ensure cross compiled image can be loaded and has correct arch."):
docker.succeed(
"docker load --input='${pkgs.dockerTools.examples.cross-aarch64}'",
)
assert (
docker.succeed(
"docker inspect ${pkgs.dockerTools.examples.cross-aarch64.imageName} "
+ "| ${pkgs.jq}/bin/jq -r .[].Architecture"
).strip()
== "arm64v8"
)
'';
})