summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2019-09-14 01:45:39 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2019-09-14 11:48:48 +0200
commit7f136b5a5607059c3dca1967ffaca126e3d1fe29 (patch)
tree67876484c7d6e75902674c91bd5aa3a4ac5d142e
parentb898c262c1ac38d9b19c22cc07a4f6f9267cfd20 (diff)
downloadnixpkgs-7f136b5a5607059c3dca1967ffaca126e3d1fe29.tar
nixpkgs-7f136b5a5607059c3dca1967ffaca126e3d1fe29.tar.gz
nixpkgs-7f136b5a5607059c3dca1967ffaca126e3d1fe29.tar.bz2
nixpkgs-7f136b5a5607059c3dca1967ffaca126e3d1fe29.tar.lz
nixpkgs-7f136b5a5607059c3dca1967ffaca126e3d1fe29.tar.xz
nixpkgs-7f136b5a5607059c3dca1967ffaca126e3d1fe29.tar.zst
nixpkgs-7f136b5a5607059c3dca1967ffaca126e3d1fe29.zip
nixos/hydra: fix test
We ship `https://cache.nixos.org` as binary cache by default which
automatically substitutes the test derivation used inside the Hydra
test. However it needs to be built locally to confirm that
`hydra-queue-runner` works properly.

Also inherited the platform name for the test derivation from `system`
to ensure that the build can be tested on each supported platform.

ZHF #68361
-rw-r--r--nixos/tests/hydra/default.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/tests/hydra/default.nix b/nixos/tests/hydra/default.nix
index f99b367ac9b..76000450921 100644
--- a/nixos/tests/hydra/default.nix
+++ b/nixos/tests/hydra/default.nix
@@ -8,8 +8,10 @@ let
   trivialJob = pkgs.writeTextDir "trivial.nix" ''
    { trivial = builtins.derivation {
        name = "trivial";
-       system = "x86_64-linux";
+       system = "${system}";
        builder = "/bin/sh";
+       allowSubstitutes = false;
+       preferLocalBuild = true;
        args = ["-c" "echo success > $out; exit 0"];
      };
    }
@@ -57,7 +59,7 @@ let
             nix = {
               buildMachines = [{
                 hostName = "localhost";
-                systems = [ "x86_64-linux" ];
+                systems = [ system ];
               }];
 
               binaryCaches = [];