Skip to content

Commit

Permalink
dockerTools: Add cross compilation test
Browse files Browse the repository at this point in the history
  • Loading branch information
adisbladis committed Nov 19, 2020
1 parent 5357abf commit 11367b2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions nixos/tests/docker-tools.nix
Expand Up @@ -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"
)
'';
})

0 comments on commit 11367b2

Please sign in to comment.