uboot: (firmwareOdroidC2/C4) don't invoke patch tool, use patches = [] instead
https://github.com/NixOS/nixpkgs/blob/master/pkgs/stdenv/generic/setup.sh#L948 this can do it nicely. Signed-off-by: Anton Arapov <anton@deadbeef.mx>
This commit is contained in:
commit
56de2bcd43
30691 changed files with 3076956 additions and 0 deletions
33
nixos/tests/user-activation-scripts.nix
Normal file
33
nixos/tests/user-activation-scripts.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import ./make-test-python.nix ({ lib, ... }: {
|
||||
name = "user-activation-scripts";
|
||||
meta = with lib.maintainers; { maintainers = [ chkno ]; };
|
||||
|
||||
nodes.machine = {
|
||||
system.userActivationScripts.foo = "mktemp ~/user-activation-ran.XXXXXX";
|
||||
users.users.alice = {
|
||||
initialPassword = "pass1";
|
||||
isNormalUser = true;
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
def verify_user_activation_run_count(n):
|
||||
machine.succeed(
|
||||
'[[ "$(find /home/alice/ -name user-activation-ran.\\* | wc -l)" == %s ]]' % n
|
||||
)
|
||||
|
||||
|
||||
machine.wait_for_unit("multi-user.target")
|
||||
machine.wait_for_unit("getty@tty1.service")
|
||||
machine.wait_until_tty_matches("1", "login: ")
|
||||
machine.send_chars("alice\n")
|
||||
machine.wait_until_tty_matches("1", "Password: ")
|
||||
machine.send_chars("pass1\n")
|
||||
machine.send_chars("touch login-ok\n")
|
||||
machine.wait_for_file("/home/alice/login-ok")
|
||||
verify_user_activation_run_count(1)
|
||||
|
||||
machine.succeed("/run/current-system/bin/switch-to-configuration test")
|
||||
verify_user_activation_run_count(2)
|
||||
'';
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue