mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-22 00:20:58 +00:00
Compare commits
18 Commits
staging-ne
...
staging-ni
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75ca7215b5 | ||
|
|
f3d4047b6a | ||
|
|
091d5fc06b | ||
|
|
2cc2d0808c | ||
|
|
9dd5455aee | ||
|
|
4731ec200a | ||
|
|
5646e24be6 | ||
|
|
fc4bc79dcb | ||
|
|
14a94467e4 | ||
|
|
636eb966e3 | ||
|
|
3018f55da9 | ||
|
|
542b4d7055 | ||
|
|
b6239b6591 | ||
|
|
02b0484ccc | ||
|
|
00c97895aa | ||
|
|
56f89898da | ||
|
|
3d32e0705a | ||
|
|
aaba92e0cc |
@@ -89,6 +89,11 @@ def main() -> None:
|
||||
type=Path,
|
||||
required=True,
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--test-script",
|
||||
help="path to a test script to run, taking precedence over the one defined in the config file",
|
||||
type=Path,
|
||||
)
|
||||
arg_parser.add_argument(
|
||||
"--keep-vm-state",
|
||||
help=argparse.SUPPRESS,
|
||||
@@ -163,8 +168,12 @@ def main() -> None:
|
||||
if args.debug_hook_attach is not None:
|
||||
debugger = Debug(logger, args.debug_hook_attach)
|
||||
|
||||
config = load_driver_configuration(args.config)
|
||||
if args.test_script is not None:
|
||||
config.test_script = args.test_script
|
||||
|
||||
with Driver(
|
||||
config=load_driver_configuration(args.config),
|
||||
config=config,
|
||||
out_dir=output_directory,
|
||||
logger=logger,
|
||||
keep_machine_state=args.keep_machine_state,
|
||||
|
||||
@@ -1422,7 +1422,6 @@ let
|
||||
modulePath = config.security.pam.pam_unixModulePath;
|
||||
settings = {
|
||||
nullok = true;
|
||||
yescrypt = lib.mkIf config.security.pam.enableLegacySettings true;
|
||||
};
|
||||
}
|
||||
{
|
||||
|
||||
@@ -577,7 +577,6 @@ in
|
||||
control = "requisite";
|
||||
modulePath = config.security.pam.pam_unixModulePath;
|
||||
settings.nullok = true;
|
||||
settings.yescrypt = true;
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -456,7 +456,6 @@ in
|
||||
control = "requisite";
|
||||
modulePath = config.security.pam.pam_unixModulePath;
|
||||
settings.nullok = true;
|
||||
settings.yescrypt = true;
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -153,6 +153,7 @@ in
|
||||
console-log = runTest ./nixos-test-driver/console-log.nix;
|
||||
containers = runTest ./nixos-test-driver/containers.nix;
|
||||
nspawn-daemon-reexec-dbus = runTest ./nspawn-daemon-reexec-dbus.nix;
|
||||
multi-arch-test = runTest ./nixos-test-driver/multi-arch-test.nix;
|
||||
skip-typecheck = runTest ./nixos-test-driver/skip-typecheck.nix;
|
||||
console-timeout = runTest ./nixos-test-driver/console-timeout.nix;
|
||||
options-doc-regression = import ./nixos-test-driver/options-doc-regression.nix { inherit pkgs; };
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
with subtest("create user"):
|
||||
machine.succeed("useradd -m alice")
|
||||
machine.succeed("(echo foobar; echo foobar) | passwd alice")
|
||||
machine.succeed("grep -F 'alice:$y$' /etc/shadow")
|
||||
|
||||
with subtest("Check whether switching VTs works"):
|
||||
machine.fail("pgrep -f 'agetty.*tty2'")
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
with subtest("create user"):
|
||||
machine.succeed("useradd -m alice")
|
||||
machine.succeed("(echo foobar; echo foobar) | passwd alice")
|
||||
machine.succeed("grep -F 'alice:$y$' /etc/shadow")
|
||||
|
||||
with subtest("Check whether switching VTs works"):
|
||||
machine.fail("pgrep -f 'agetty.*tty2'")
|
||||
|
||||
55
nixos/tests/nixos-test-driver/multi-arch-test.nix
Normal file
55
nixos/tests/nixos-test-driver/multi-arch-test.nix
Normal file
@@ -0,0 +1,55 @@
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
name = "multi-arch-test";
|
||||
meta.maintainers = with pkgs.lib.maintainers; [ tfc ];
|
||||
|
||||
node.pkgsReadOnly = false;
|
||||
|
||||
nodes = {
|
||||
# Setting build = host platform because such standard VM setups
|
||||
# are well-cached by the multi-arch build infrastructure of the
|
||||
# project.
|
||||
vmIntel = {
|
||||
nixpkgs.buildPlatform = "x86_64-linux";
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
};
|
||||
vmArm = {
|
||||
nixpkgs.buildPlatform = "aarch64-linux";
|
||||
nixpkgs.hostPlatform = "aarch64-linux";
|
||||
};
|
||||
};
|
||||
|
||||
defaults = {
|
||||
# not needed for this test and shrinks the closure
|
||||
# because we dont' need qemu for all architectures
|
||||
virtualisation.qemu.guestAgent.enable = false;
|
||||
|
||||
# the test is already very slow but we don't need DHCP anyway
|
||||
networking.dhcpcd.enable = false;
|
||||
|
||||
# fix the network-online target, otherwise it doesn't work
|
||||
# properly as a synchronization mechanism.
|
||||
systemd.network.wait-online.enable = true;
|
||||
systemd.network.wait-online.anyInterface = true;
|
||||
};
|
||||
|
||||
# slow due to SW emulation but shouldn't be slower than that
|
||||
globalTimeout = 5 * 60;
|
||||
|
||||
testScript = { nodes, ... }: /* python */ ''
|
||||
start_all()
|
||||
|
||||
vmIntel.systemctl("start network-online.target")
|
||||
vmArm.systemctl("start network-online.target")
|
||||
vmIntel.wait_for_unit("network-online.target")
|
||||
vmArm.wait_for_unit("network-online.target")
|
||||
|
||||
vmIntel.succeed("ping -c 1 vmArm")
|
||||
vmArm.succeed("ping -c 1 vmIntel")
|
||||
|
||||
archIntel = vmIntel.succeed("uname -m")
|
||||
t.assertIn("${nodes.vmIntel.nixpkgs.hostPlatform.qemuArch}", archIntel, "machine1 is an intel VM")
|
||||
archArm = vmArm.succeed("uname -m")
|
||||
t.assertIn("${nodes.vmArm.nixpkgs.hostPlatform.qemuArch}", archArm, "machine1 is an ARM VM")
|
||||
'';
|
||||
}
|
||||
@@ -13,8 +13,8 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
src = fetchFromGitHub {
|
||||
owner = "NetworkConfiguration";
|
||||
repo = "openresolv";
|
||||
rev = "v${finalAttrs.version}";
|
||||
sha256 = "sha256-I86BHiSI3G4xlYRJC99elHw8RyUd3eHdkV5kiEGRXNE=";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-I86BHiSI3G4xlYRJC99elHw8RyUd3eHdkV5kiEGRXNE=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
@@ -38,6 +38,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
'';
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/NetworkConfiguration/openresolv/releases/tag/${finalAttrs.src.tag}";
|
||||
description = "Program to manage /etc/resolv.conf";
|
||||
mainProgram = "resolvconf";
|
||||
homepage = "https://roy.marples.name/projects/openresolv";
|
||||
|
||||
@@ -7981,7 +7981,6 @@ with pkgs;
|
||||
|
||||
qemu_test = lowPrio (
|
||||
qemu.override {
|
||||
hostCpuOnly = true;
|
||||
nixosTestRunner = true;
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user