diff options
author | Weijia Wang <9713184+wegank@users.noreply.github.com> | 2023-04-20 22:31:30 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-20 22:31:30 +0300 |
commit | 8b1ef3b06ceaeb27729640150579a636535365a7 (patch) | |
tree | 8b1b655ffff3afb853f93035b4aa25a897956e3e /pkgs/games | |
parent | 486b1dbe8a51d7664421fe0f78f086db3c03c275 (diff) | |
parent | 6032e00504291bfe6b9b6b5e6b03417859722de4 (diff) |
Merge pull request #225222 from Luflosi/test-aaaaxy
nixos/tests/aaaaxy: init
Diffstat (limited to 'pkgs/games')
-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; { |