add --no-reexec to nixos-rebuild in the VM tests

This commit is contained in:
Qyriad 2026-03-05 15:44:58 +01:00
parent 442728a5ca
commit 301fe041c4
3 changed files with 6 additions and 6 deletions

View file

@ -94,7 +94,7 @@ assert args.job_lifetime == 900, f'{args.job_lifetime} != 900'
assert args.log_level == 'warning', f'{args.log_level=} != warning' assert args.log_level == 'warning', f'{args.log_level=} != warning'
with machine.nested("must succeed: initial nixos-rebuild switch"): with machine.nested("must succeed: initial nixos-rebuild switch"):
machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --fallback") machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --no-reexec --fallback")
# Config should not have changed. # Config should not have changed.
args = get_cli_args() args = get_cli_args()
@ -122,7 +122,7 @@ assert args.job_lifetime == 900, f'{args.job_lifetime} != 900'
assert args.log_level == new_log_level, f'{args.log_level=} != {new_log_level=}' assert args.log_level == new_log_level, f'{args.log_level=} != {new_log_level=}'
# And this should set everything back. # And this should set everything back.
machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --fallback") machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --no-reexec --fallback")
args = get_cli_args() args = get_cli_args()
assert args.jobs == 12, f'{args.jobs=} != 12' assert args.jobs == 12, f'{args.jobs=} != 12'
assert args.job_lifetime == 900, f'{args.job_lifetime} != 900' assert args.job_lifetime == 900, f'{args.job_lifetime} != 900'

View file

@ -76,7 +76,7 @@ dynix_out = machine.succeed("dynix --version")
assert "dynix" in dynix_out, f"dynix not in {dynix_out=}" assert "dynix" in dynix_out, f"dynix not in {dynix_out=}"
machine.log("REBUILDING configuration inside VM") machine.log("REBUILDING configuration inside VM")
machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --fallback") machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --no-reexec --fallback")
machine.wait_for_unit("gotosocial.service") machine.wait_for_unit("gotosocial.service")
# Make sure the config before any dynamic changes is what we expect. # Make sure the config before any dynamic changes is what we expect.
@ -107,7 +107,7 @@ except StopIteration:
assert new_app_name in application_name, f"'{new_app_name}' should be in {application_name=}" assert new_app_name in application_name, f"'{new_app_name}' should be in {application_name=}"
machine.log("REBUILDING configuration inside VM") machine.log("REBUILDING configuration inside VM")
machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --fallback") machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --no-reexec --fallback")
machine.wait_for_unit("gotosocial.service") machine.wait_for_unit("gotosocial.service")

View file

@ -82,7 +82,7 @@ assert int(config_toml['workers']) == 4, f"{config_toml['workers']=} != 4"
assert int(config_toml['max_connection_rate']) == 256, f"{config_toml['max_connection_rate']=} != 256" assert int(config_toml['max_connection_rate']) == 256, f"{config_toml['max_connection_rate']=} != 256"
with machine.nested("must succeed: initial nixos-rebuild switch"): with machine.nested("must succeed: initial nixos-rebuild switch"):
machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --fallback") machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --no-reexec -v --fallback")
# Config should not have changed. # Config should not have changed.
config_toml = get_config_file() config_toml = get_config_file()
@ -108,7 +108,7 @@ assert int(config_toml['max_connection_rate']) == new_max_connection_rate, f"{co
assert int(config_toml['workers']) == new_workers, f"{config_toml['workers']=} != {new_workers}" assert int(config_toml['workers']) == new_workers, f"{config_toml['workers']=} != {new_workers}"
# And this should set everything back. # And this should set everything back.
machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --fallback") machine.succeed("env PAGER= nixos-rebuild switch --log-format raw-with-logs --no-reexec -v --fallback")
machine.wait_for_unit("harmonia.service") machine.wait_for_unit("harmonia.service")
config_toml = get_config_file() config_toml = get_config_file()
assert int(config_toml['max_connection_rate']) == 256, f'{config_toml["max_connection_rate"]=} != 256' assert int(config_toml['max_connection_rate']) == 256, f'{config_toml["max_connection_rate"]=} != 256'