Merge pull request #241949 from R-VdP/nixos_test_busybox

nixos/test-driver: use the short form argument to base64 for busybox compatibility.

Changed files
+18 -1
nixos
lib
test-driver
test_driver
tests
nixos-test-driver
+1 -1
nixos/lib/test-driver/test_driver/machine.py
···
# While sh is bash on NixOS, this is not the case for every distro.
# We explicitly call bash here to allow for the driver to boot other distros as well.
out_command = (
-
f"{timeout_str} bash -c {shlex.quote(command)} | (base64 --wrap 0; echo)\n"
)
assert self.shell
···
# While sh is bash on NixOS, this is not the case for every distro.
# We explicitly call bash here to allow for the driver to boot other distros as well.
out_command = (
+
f"{timeout_str} bash -c {shlex.quote(command)} | (base64 -w 0; echo)\n"
)
assert self.shell
+1
nixos/tests/all-tests.nix
···
extra-python-packages = handleTest ./nixos-test-driver/extra-python-packages.nix {};
lib-extend = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./nixos-test-driver/lib-extend.nix {};
node-name = runTest ./nixos-test-driver/node-name.nix;
};
# NixOS vm tests and non-vm unit tests
···
extra-python-packages = handleTest ./nixos-test-driver/extra-python-packages.nix {};
lib-extend = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./nixos-test-driver/lib-extend.nix {};
node-name = runTest ./nixos-test-driver/node-name.nix;
+
busybox = runTest ./nixos-test-driver/busybox.nix;
};
# NixOS vm tests and non-vm unit tests
+16
nixos/tests/nixos-test-driver/busybox.nix
···
···
+
{
+
name = "Test that basic tests work when busybox is installed";
+
+
nodes = {
+
machine = ({ pkgs, ... }: {
+
environment.systemPackages = [
+
pkgs.busybox
+
];
+
});
+
};
+
+
testScript = ''
+
start_all()
+
machine.wait_for_unit("multi-user.target")
+
'';
+
}