Merge pull request #50774 from oxij/pkgs/test-versioning

pkgs/test/nixos-functions: use dummy versioning
This commit is contained in:
Michael Raskin 2018-11-22 08:12:28 +00:00 committed by GitHub
commit 7b1d2324c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -11,10 +11,17 @@ To run this test:
*/
{ pkgs, lib, stdenv, ... }:
lib.optionalAttrs stdenv.hostPlatform.isLinux (
let
dummyVersioning = {
revision = "test";
versionSuffix = "test";
label = "test";
};
in lib.optionalAttrs stdenv.hostPlatform.isLinux (
pkgs.recurseIntoAttrs {
nixos-test = (pkgs.nixos {
system.nixos = dummyVersioning;
boot.loader.grub.enable = false;
fileSystems."/".device = "/dev/null";
}).toplevel;
@ -22,6 +29,7 @@ lib.optionalAttrs stdenv.hostPlatform.isLinux (
nixosTest-test = pkgs.nixosTest ({ lib, pkgs, ... }: {
name = "nixosTest-test";
machine = { pkgs, ... }: {
system.nixos = dummyVersioning;
environment.systemPackages = [ pkgs.hello ];
};
testScript = ''