diff options
author | adisbladis <adisbladis@gmail.com> | 2020-11-19 18:12:36 +0100 |
---|---|---|
committer | adisbladis <adisbladis@gmail.com> | 2020-11-19 18:13:22 +0100 |
commit | 11367b2db107f318c5ca5634a94c85d185f2c498 (patch) | |
tree | 21fe6bb905c9b35bc646b7e9240a65f1ca799f95 | |
parent | 5357abf49a9c19de84ec5333fcd07a10c05585cc (diff) |
dockerTools: Add cross compilation test
-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" + ) ''; }) |