diff options
author | Robert Hensing <roberth@users.noreply.github.com> | 2020-11-19 20:41:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 20:41:53 +0100 |
commit | c68e739300d551a755e04dcca6fca1f3dbb21421 (patch) | |
tree | 5d718d21ac19d6066c5a1f890b296f8b245e75c5 /nixos/tests/docker-tools.nix | |
parent | c81c3c3daff4a96980da2fce2d80a9e57f9db953 (diff) | |
parent | 11367b2db107f318c5ca5634a94c85d185f2c498 (diff) |
Merge pull request #104271 from adisbladis/dockertools-cross
dockerTools.buildLayeredImage: Fix cross compilation
Diffstat (limited to 'nixos/tests/docker-tools.nix')
-rw-r--r-- | nixos/tests/docker-tools.nix | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nixos/tests/docker-tools.nix b/nixos/tests/docker-tools.nix index c1c41b0fc110..a20a08fc90db 100644 --- a/nixos/tests/docker-tools.nix +++ b/nixos/tests/docker-tools.nix @@ -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" + ) ''; }) |