allow changing hardware device in tests

This commit is contained in:
Daniel Barlow 2022-09-20 16:09:44 +01:00
parent e892dc6e9c
commit ad759b7c6d
3 changed files with 13 additions and 1 deletions

11
devices/qemu.nix Normal file
View file

@ -0,0 +1,11 @@
{
system = {
crossSystem = {
config = "mips-unknown-linux-musl";
gcc = {
abi = "32";
arch = "mips32"; # maybe mips_24kc-
};
};
};
}

View file

@ -1,5 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
export DEVICE=${DEVICE-qemu}
export TMPDIR=${TMPDIR-/tmp} export TMPDIR=${TMPDIR-/tmp}
for i in tests/*/run.sh; do for i in tests/*/run.sh; do

View file

@ -1,5 +1,5 @@
set -e set -e
NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-build -I liminix-config=./tests/smoke/configuration.nix -o smoke.img NIXPKGS_ALLOW_UNSUPPORTED_SYSTEM=1 nix-build -I liminix-config=./tests/smoke/configuration.nix --arg device "import ./devices/$DEVICE.nix" -o smoke.img
TESTS=$(cat <<"EOF" TESTS=$(cat <<"EOF"