diff options
author | Luflosi <luflosi@luflosi.de> | 2023-04-04 20:18:38 +0200 |
---|---|---|
committer | Luflosi <luflosi@luflosi.de> | 2023-04-13 00:43:44 +0200 |
commit | 6032e00504291bfe6b9b6b5e6b03417859722de4 (patch) | |
tree | 9bffb1dcc830529d7ff0c3857975d35ce3fc846c /pkgs/games/aaaaxy | |
parent | 0b572401112cee6cb959692944ed2062e2d71fa8 (diff) |
nixos/tests/aaaaxy: init
Add a simple VM test for the game AAAAXY.
Diffstat (limited to 'pkgs/games/aaaaxy')
-rw-r--r-- | pkgs/games/aaaaxy/default.nix | 25 |
1 files changed, 14 insertions, 11 deletions
diff --git a/pkgs/games/aaaaxy/default.nix b/pkgs/games/aaaaxy/default.nix index c10390d49037e..9a0acc502b955 100644 --- a/pkgs/games/aaaaxy/default.nix +++ b/pkgs/games/aaaaxy/default.nix @@ -12,6 +12,7 @@ , libXxf86vm , go-licenses , pkg-config +, nixosTests }: buildGoModule rec { @@ -40,11 +41,17 @@ buildGoModule rec { pkg-config ]; + outputs = [ "out" "testing_infra" ]; + postPatch = '' # Without patching, "go run" fails with the error message: # package github.com/google/go-licenses: no Go files in /build/source/vendor/github.com/google/go-licenses substituteInPlace scripts/build-licenses.sh --replace \ '$GO run ''${GO_FLAGS} github.com/google/go-licenses' 'go-licenses' + + patchShebangs scripts/ + substituteInPlace scripts/regression-test-demo.sh \ + --replace 'sh scripts/run-timedemo.sh' "$testing_infra/scripts/run-timedemo.sh" ''; makeFlags = [ @@ -63,20 +70,16 @@ buildGoModule rec { install -Dm644 'aaaaxy.png' -t "$out/share/icons/hicolor/128x128/apps/" install -Dm644 'aaaaxy.desktop' -t "$out/share/applications/" install -Dm644 'io.github.divverent.aaaaxy.metainfo.xml' -t "$out/share/metainfo/" - ''; - - checkPhase = '' - runHook preCheck - # Can't get GLX to work even though it seems to work in their CI system: - # [FATAL] RunGame exited abnormally: APIUnavailable: GLX: GLX extension not found - # xvfb-run sh scripts/regression-test-demo.sh aaaaxy \ - # "on track for Any%, All Paths and No Teleports" \ - # ./aaaaxy assets/demos/benchmark.dem - - runHook postCheck + install -Dm755 'scripts/run-timedemo.sh' -t "$testing_infra/scripts/" + install -Dm755 'scripts/regression-test-demo.sh' -t "$testing_infra/scripts/" + install -Dm644 'assets/demos/benchmark.dem' -t "$testing_infra/assets/demos/" ''; + passthru.tests = { + aaaaxy = nixosTests.aaaaxy; + }; + strictDeps = true; meta = with lib; { |