Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nixos/tests/sway: init #121437

Merged
merged 1 commit into from
May 5, 2021
Merged

nixos/tests/sway: init #121437

merged 1 commit into from
May 5, 2021

Conversation

primeos
Copy link
Member

@primeos primeos commented May 1, 2021

Motivation for this change

Needs some more love (WIP) but already works and IMO this would make a nice addition to e.g. also test Wayland, wlroots, and mesa.

I shamelessly stole the login function from nixos/tests/ecryptfs.nix btw. Could make sense to add an abstraction for that (haven't really looked at it so far - this was just a quick evening hack).

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label May 1, 2021
@primeos
Copy link
Member Author

primeos commented May 1, 2021

@GrahamcOfBorg test sway

@primeos primeos mentioned this pull request May 1, 2021
10 tasks
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels May 1, 2021
@Synthetica9
Copy link
Member

Needs some more love

Gave it some love https://github.com/primeos/nixpkgs/pull/4/files

nixos/tests/sway.nix Outdated Show resolved Hide resolved
This adds a basic test for Sway. Because Sway is an important part of
the Wayland ecosystem, is stable, and has few dependencies this test
should also be suitable for testing core packages it depends on (e.g.
wayland, wayland-protocols, wlroots, xwayland, mesa, libglvnd, libdrm,
and soon libseat).

The test is modeled after the suggested way of using Sway, i.e. logging
in via a virtual console (tty1) and copying the configuration from
/etc/sway/config (we replace Mod4 (the GNU/Tux key - you've replaced
that evil logo, right? :D) with Mod1 (Alt key) because QEMU monitor's
sendkey command doesn't support the former).

The shell aliases are used to make the sendkey log output shorter.

Co-authored-by: Patrick Hilhorst <[email protected]>
@primeos primeos force-pushed the nixos-tests-sway branch from 8280457 to 957b7a4 Compare May 4, 2021 14:54
@primeos primeos marked this pull request as ready for review May 4, 2021 14:58
@primeos
Copy link
Member Author

primeos commented May 4, 2021

@GrahamcOfBorg test sway
2

@primeos
Copy link
Member Author

primeos commented May 5, 2021

Not sure what's up with the aarch64-linux timeout - it looks like the VM doesn't even start for some reason... Hopefully that only affects ofborg.

Let's give this test a go.

@primeos primeos merged commit ff5fdec into NixOS:master May 5, 2021
@primeos primeos mentioned this pull request May 27, 2021
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants