From 6f6c08af30ceafe36580205e829321b763e04af3 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 16 Apr 2020 01:01:08 +0200 Subject: [PATCH 1/3] hydra-unstable: 2020-04-07 -> 2020-04-16 --- pkgs/development/tools/misc/hydra/default.nix | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix index 9e14e16dbaaf..12b70c8a5aee 100644 --- a/pkgs/development/tools/misc/hydra/default.nix +++ b/pkgs/development/tools/misc/hydra/default.nix @@ -19,20 +19,13 @@ # so when having an older version, `pkgs.hydra-migration` should be deployed first. hydra-unstable = callPackage ./common.nix { - version = "2020-04-07"; + version = "2020-04-16"; src = fetchFromGitHub { owner = "NixOS"; repo = "hydra"; - rev = "4cabb37ebdeade1435ad8ebf1913cdd603b9c452"; - sha256 = "1ccy639x6yyrqqqqli7vlqm6pcvcq5dx1w3ckba77rl8pd5h31f7"; + rev = "87837f1d82904bf48e11b5641258b6be2f663c3b"; + sha256 = "1vs3lyfyafsl7wbpmycv7c3n9n2rkrswp65msb6q1iskgpvr96d5"; }; - patches = [ - # https://github.com/NixOS/hydra/pull/732 - (fetchpatch { - url = "https://github.com/NixOS/hydra/commit/2f9d422172235297759f2b224fe0636cad07b6fb.patch"; - sha256 = "0152nsqqc5d85qdygmwrsk88i9y6nk1b639fj2n042pjvr0kpz6k"; - }) - ]; nix = nixFlakes; }; } From ef80b6324b9c387256027159796f4f5adbfffe6a Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Wed, 15 Apr 2020 22:14:20 +0200 Subject: [PATCH 2/3] hydra*: add `passthru.tests` to reference VM-tests --- pkgs/development/tools/misc/hydra/common.nix | 3 ++- pkgs/development/tools/misc/hydra/default.nix | 11 ++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/pkgs/development/tools/misc/hydra/common.nix b/pkgs/development/tools/misc/hydra/common.nix index 52a91db67582..75a9689267a1 100644 --- a/pkgs/development/tools/misc/hydra/common.nix +++ b/pkgs/development/tools/misc/hydra/common.nix @@ -5,6 +5,7 @@ , docbook_xsl, openssh, gnused, coreutils, findutils, gzip, lzma, gnutar , rpm, dpkg, cdrkit, pixz, lib, boost, autoreconfHook, src ? null, version ? null , migration ? false, patches ? [] +, tests ? {} }: with stdenv; @@ -124,7 +125,7 @@ in stdenv.mkDerivation rec { dontStrip = true; - passthru = { inherit perlDeps migration; }; + passthru = { inherit perlDeps migration tests; }; meta = with stdenv.lib; { description = "Nix-based continuous build system"; diff --git a/pkgs/development/tools/misc/hydra/default.nix b/pkgs/development/tools/misc/hydra/default.nix index 12b70c8a5aee..f9a50dd0ea0e 100644 --- a/pkgs/development/tools/misc/hydra/default.nix +++ b/pkgs/development/tools/misc/hydra/default.nix @@ -1,4 +1,4 @@ -{ fetchFromGitHub, nixStable, callPackage, nixFlakes, fetchpatch }: +{ fetchFromGitHub, nixStable, callPackage, nixFlakes, fetchpatch, nixosTests }: { # Package for phase-1 of the db migration for Hydra. @@ -13,6 +13,11 @@ }; nix = nixStable; migration = true; + + tests = { + db-migration = nixosTests.hydra-db-migration.mig; + basic = nixosTests.hydra.hydra-migration; + }; }; # Hydra from latest master branch. Contains breaking changes, @@ -27,5 +32,9 @@ sha256 = "1vs3lyfyafsl7wbpmycv7c3n9n2rkrswp65msb6q1iskgpvr96d5"; }; nix = nixFlakes; + tests = { + db-migration = nixosTests.hydra-db-migration.mig; + basic = nixosTests.hydra.hydra-unstable; + }; }; } From 5e124e5abd53108b3f21f9f7a1ec56db002fee4f Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Thu, 16 Apr 2020 02:03:53 +0200 Subject: [PATCH 3/3] nixos/tests: fix inclusion of hydra test --- nixos/tests/hydra/db-migration.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/nixos/tests/hydra/db-migration.nix b/nixos/tests/hydra/db-migration.nix index aa1c81c9e775..cf74acfd67aa 100644 --- a/nixos/tests/hydra/db-migration.nix +++ b/nixos/tests/hydra/db-migration.nix @@ -1,8 +1,14 @@ -{ system ? builtins.currentSystem, ... }: +{ system ? builtins.currentSystem +, pkgs ? import ../../.. { inherit system; } +, ... +}: let inherit (import ./common.nix { inherit system; }) baseConfig; in -{ mig = import ../make-test-python.nix ({ pkgs, lib, ... }: { +with import ../../lib/testing-python.nix { inherit system pkgs; }; +with pkgs.lib; + +{ mig = makeTest { name = "hydra-db-migration"; meta = with pkgs.stdenv.lib.maintainers; { maintainers = [ ma27 ]; @@ -82,5 +88,5 @@ let inherit (import ./common.nix { inherit system; }) baseConfig; in original.shutdown() ''; - }); + }; }