mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
tests: Don't use pkgs.extend. OfBorg will reject it.
The good news is that it worked as expected.
This commit is contained in:
parent
933c95c0f4
commit
5d594d764e
@ -8,20 +8,10 @@ lib.optionalAttrs stdenv.hostPlatform.isLinux (
|
||||
fileSystems."/".device = "/dev/null";
|
||||
}).toplevel;
|
||||
|
||||
nixosTest-test = let
|
||||
# extend pkgs with an extra overlay to make sure pkgs is passed along properly to machines.
|
||||
altPkgs = pkgs.extend (self: super: {
|
||||
# To test pkgs in machine
|
||||
hello_s9e8ghsi = self.hello;
|
||||
# To test lib in test
|
||||
lib = super.lib // { testSubject_dohra8w = "nixosTest"; };
|
||||
# To test pkgs in test
|
||||
dash-test_ny3dseg = "-test";
|
||||
});
|
||||
in altPkgs.nixosTest ({ lib, pkgs, ... }: {
|
||||
name = "${lib.testSubject_dohra8w}${pkgs.dash-test_ny3dseg}"; # These would fail if it's the wrong pkgs or lib
|
||||
nixosTest-test = pkgs.nixosTest ({ lib, pkgs, ... }: {
|
||||
name = "nixosTest-test";
|
||||
machine = { pkgs, ... }: {
|
||||
environment.systemPackages = [ pkgs.hello_s9e8ghsi ];
|
||||
environment.systemPackages = [ pkgs.hello ];
|
||||
};
|
||||
testScript = ''
|
||||
$machine->succeed("hello");
|
||||
|
Loading…
Reference in New Issue
Block a user