kexec-installer: add smoketest for binaries

This commit is contained in:
Jörg Thalheim 2023-05-15 12:04:37 +02:00
parent 4ad9c55cf2
commit 8451894552
2 changed files with 7 additions and 1 deletions

View file

@ -47,6 +47,10 @@ in {
cp "${config.system.build.kexecRun}" kexec/run cp "${config.system.build.kexecRun}" kexec/run
cp "${pkgs.pkgsStatic.kexec-tools}/bin/kexec" kexec/kexec cp "${pkgs.pkgsStatic.kexec-tools}/bin/kexec" kexec/kexec
cp "${iprouteStatic}/bin/ip" kexec/ip cp "${iprouteStatic}/bin/ip" kexec/ip
${lib.optionalString (pkgs.hostPlatform == pkgs.buildPlatform) ''
kexec/ip -V
kexec/kexec --version
''}
tar -czvf $out/${config.system.kexec-installer.name}-${pkgs.stdenv.hostPlatform.system}.tar.gz kexec tar -czvf $out/${config.system.kexec-installer.name}-${pkgs.stdenv.hostPlatform.system}.tar.gz kexec
''; '';

View file

@ -131,7 +131,9 @@ makeTest' {
node1.succeed('touch /run/foo') node1.succeed('touch /run/foo')
node1.fail('parted --version >&2') node1.fail('parted --version >&2')
node1.succeed('tar -xf ${kexecTarball}/nixos-kexec-installer-noninteractive-${pkgs.system}.tar.gz -C /root') node1.succeed('tar -xf ${kexecTarball}/nixos-kexec-installer-noninteractive-${pkgs.system}.tar.gz -C /root')
node1.execute('/root/kexec/run >&2') node1.succeed('/root/kexec/ip -V >&2')
node1.succeed('/root/kexec/kexec --version >&2')
node1.succeed('/root/kexec/run >&2')
# wait for kexec to finish # wait for kexec to finish
while ssh(["true"], check=False).returncode == 0: while ssh(["true"], check=False).returncode == 0: