1{ pkgs, lib, ... }: {
2 name = "aaaaxy";
3 meta.maintainers = with lib.maintainers; [ Luflosi ];
4
5 nodes.machine = {
6 imports = [
7 ./common/x11.nix
8 ];
9 };
10
11 # This starts the game from a known state, feeds it a prerecorded set of button presses
12 # and then checks if the final game state is identical to the expected state.
13 # This is also what AAAAXY's CI system does and serves as a good sanity check.
14 testScript = ''
15 machine.wait_for_x()
16
17 machine.succeed(
18 # benchmark.dem needs to be in a mutable directory,
19 # so we can't just refer to the file in the Nix store directly
20 "mkdir -p '/tmp/aaaaxy/assets/demos/'",
21 "ln -s '${pkgs.aaaaxy.testing_infra}/assets/demos/benchmark.dem' '/tmp/aaaaxy/assets/demos/'",
22 """
23 '${pkgs.aaaaxy.testing_infra}/scripts/regression-test-demo.sh' \
24 'aaaaxy' 'on track for Any%, All Paths and No Teleports' \
25 '${pkgs.aaaaxy}/bin/aaaaxy' '/tmp/aaaaxy/assets/demos/benchmark.dem'
26 """,
27 )
28 '';
29}