diff options
author | aszlig <aszlig@nix.build> | 2018-10-03 03:48:04 +0200 |
---|---|---|
committer | aszlig <aszlig@nix.build> | 2018-10-03 03:57:28 +0200 |
commit | 5e7bf8c5e9da260c912e8abda5fb8a407ee3da7e (patch) | |
tree | 7612ada2e365933012a6692e63c3ca08e0aa9d03 /nixos/tests | |
parent | 889c72032f8595fcd7542c6032c208f6b8033db6 (diff) | |
download | nixpkgs-5e7bf8c5e9da260c912e8abda5fb8a407ee3da7e.tar nixpkgs-5e7bf8c5e9da260c912e8abda5fb8a407ee3da7e.tar.gz nixpkgs-5e7bf8c5e9da260c912e8abda5fb8a407ee3da7e.tar.bz2 nixpkgs-5e7bf8c5e9da260c912e8abda5fb8a407ee3da7e.tar.lz nixpkgs-5e7bf8c5e9da260c912e8abda5fb8a407ee3da7e.tar.xz nixpkgs-5e7bf8c5e9da260c912e8abda5fb8a407ee3da7e.tar.zst nixpkgs-5e7bf8c5e9da260c912e8abda5fb8a407ee3da7e.zip |
nixos/tests/misc: Fix reboot-wtmp subtest
From commit b63f65aea0dea11c20e9299210af1d2ee4299b58: I used tmpfiles.d instead of activation snippets to create the logs. It's good enough for upstream and other distros; it's probably good enough for us. The "reboot-wtmp" subtest fails because it it assumes that there is a reboot record even on the initial boot. This is only the case if wtmp is created within the activation script, but the implementation now uses tmpfiles.d, so the creation of the file is done at a much later stage. Apart from that, if you think about the state after the installation as "first boot", using the term "reboot" wouldn't probably make sense either. So in our subtest, we now reboot the machine and check the wtmp record afterwards as we did before. Signed-off-by: aszlig <aszlig@nix.build> Cc: @edolstra, @jameysharp, @Mic92
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/misc.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/tests/misc.nix b/nixos/tests/misc.nix index 6d72ac997f8..3ad55651b11 100644 --- a/nixos/tests/misc.nix +++ b/nixos/tests/misc.nix @@ -78,6 +78,8 @@ import ./make-test.nix ({ pkgs, ...} : rec { # Test whether we have a reboot record in wtmp. subtest "reboot-wtmp", sub { + $machine->shutdown; + $machine->waitForUnit('multi-user.target'); $machine->succeed("last | grep reboot >&2"); }; |