diff options
Diffstat (limited to 'nixos/tests')
-rw-r--r-- | nixos/tests/aaaaxy.nix | 28 | ||||
-rw-r--r-- | nixos/tests/all-tests.nix | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/nixos/tests/aaaaxy.nix b/nixos/tests/aaaaxy.nix new file mode 100644 index 0000000000000..a1e1d44773c82 --- /dev/null +++ b/nixos/tests/aaaaxy.nix @@ -0,0 +1,28 @@ +{ pkgs, lib, ... }: { + name = "aaaaxy"; + meta.maintainers = with lib.maintainers; [ Luflosi ]; + + nodes.machine = { + hardware.opengl.enable = true; + }; + + # This starts the game from a known state, feeds it a prerecorded set of button presses + # and then checks if the final game state is identical to the expected state. + # This is also what AAAAXY's CI system does and serves as a good sanity check. + testScript = '' + machine.wait_for_unit("basic.target") + + machine.succeed( + # benchmark.dem needs to be in a mutable directory, + # so we can't just refer to the file in the Nix store directly + "mkdir -p '/tmp/aaaaxy/assets/demos/'", + "ln -s '${pkgs.aaaaxy.testing_infra}/assets/demos/benchmark.dem' '/tmp/aaaaxy/assets/demos/'", + """ + '${pkgs.xvfb-run}/bin/xvfb-run' \ + '${pkgs.aaaaxy.testing_infra}/scripts/regression-test-demo.sh' \ + 'aaaaxy' 'on track for Any%, All Paths and No Teleports' \ + '${pkgs.aaaaxy}/bin/aaaaxy' '/tmp/aaaaxy/assets/demos/benchmark.dem' + """, + ) + ''; +} diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8d341dd6653ee..5b802fb263042 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -67,6 +67,7 @@ let in { _3proxy = runTest ./3proxy.nix; + aaaaxy = runTest ./aaaaxy.nix; acme = runTest ./acme.nix; adguardhome = runTest ./adguardhome.nix; aesmd = runTestOn ["x86_64-linux"] ./aesmd.nix; |