-
-
Notifications
You must be signed in to change notification settings - Fork 264
treewide: allow re-running test code and simplify testbeds #1662
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
base: master
Are you sure you want to change the base?
treewide: allow re-running test code and simplify testbeds #1662
Conversation
1e3df8b
to
0a8661c
Compare
b9e3c74
to
a5a8c41
Compare
a5a8c41
to
0042265
Compare
Important This patchset should be |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally lgtm, just some small things
name = name'; | ||
}; | ||
|
||
name' = "stylix-testbed" + lib.optionalString (name != "") "-${name}"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer putting name'
at the top of the let in
because it's used by other things in the let in
block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer putting
name'
at the top of thelet in
because it's used by other things in thelet in
block
The let application name' in
order was already previously present.
Personally, I prefer uniformly sorting non-special constructs lexicographically to avoid ambiguous cases, while keeping the set of special constructs as small as possible.
For example, keeping the
╭-------a-------╮
| |
╭---aa---╮ ╭---ab---╮
| | | |
aaa aab aba abb
dependency tree declarations in DFS order (a aa aaa aab ab aba abb
) without tooling (which is practically non-existent) is a lot more effort than simply lexicographically sorting them. Note that the recursive DFS order falls apart when dealing with general DAGs, as in aaa
also depends on aba
in the previous graph. Since most modern languages, including Nix, no longer require declaration before use, identifiers can be arbitrarily ordered within the same scope, in which case I prefer lexicographical sorting.
Special Nix constructs include imports options config
declarations and conventional fetchFrom* { owner repo rev hash }
argument sorting.
I am fine with moving name'
to the top, but we can also just leave it as-is.
Fixes: 8b898ca ("sxiv: avoid downloading custom file in testbed (nix-community#1641)")
Co-authored-by: awwpotato <[email protected]>
Allow re-running test code via deskop items and stylix-testbed-${name} CLIs.
Simplify and standardize testbeds by replacing config.stylix.testbed.ui.application declarations with config.stylix.testbed.ui.command, and replacing stylix.testbed.ui.command = { packages = [ package ]; text = package.meta.mainProgram; }; with stylix.testbed.ui.command.packages = [ package ]; by trivially deducing config.stylix.testbed.ui.command.text from config.stylix.testbed.ui.command.packages. Leverage the default programs."<PACKAGE>".package value to simplify let package = pkgs."<PACKAGE>"; in { stylix.testbed.ui.command.packages = [ package ]; home-manager.sharedModules = lib.singleton { programs."<PACKAGE>" = { inherit package; enable = true; }; }; } to { stylix.testbed.ui.command.text = "<PACKAGE_META_MAIN_PROGRAM>"; home-manager.sharedModules = lib.singleton { programs."<PACKAGE>".enable = true; }; } Minor stylistic changes are made to standardize testbed declarations.
Simplify the testbed interface by renaming stylix.testbed.ui.command.useTerminal to stylix.testbed.ui.command.terminal.
0042265
to
92ee46f
Compare
The x86_64-linux Zathura testbeds keep failing because of https://nix-community.cachix.org:
Are we rate limiting the cache because all of the testbeds in this PR are new? Note that the aarch64-linux job succeeded on the second CI attempt. Running just nix build .#checks.x86_64-linux.testbed:zathura:{dark,imageless,cursorless} locally also causes the same errors... For reference, CI was still passing on v7. CC: @danth |
Changelog
v8: 92ee46f
v7: 0042265
treewide: simplify and standardize testbeds
programs."<PACKAGE">.package
typo in commit message withprograms."<PACKAGE>".package
./modules/spicetify/testbeds/spicetify.nix
formatting, as suggested in treewide: allow re-running test code and simplify testbeds #1662 (comment).v6: a5a8c41
treewide: simplify and standardize testbeds
stylix.testbed.ui.command.text
usage in/modules/spicetify/testbeds/spicetify.nix
.v5: b9e3c74
treewide: simplify and standardize testbeds
stylix.testbed.ui.command.packages = [ pkgs.kitty ];
in/modules/kde/testbeds/plasma5.nix
to avoid enabling GNOME.v4: 2b4754f
treewide: simplify and standardize testbeds
packages
variable inthrow
.v3: 303cef8
treewide: simplify and standardize testbeds
throw
call.multiline = false;
because we arethrow
ing and no longer curating assertion errors.v2: 1a8885e
treewide: simplify and standardize testbeds
null
access by inlining assertion and using local variables.v1: 0a8661c
treewide: optionally apply lib.getExe to stylix.testbed.ui.command.gnome-text-editor
in favor of the new committreewide: simplify and standardize testbeds
.sxiv/testbed: remove trailing Bash semicolon
stylix/testbed/modules/application: allow re-running test code
stylix/testbed/modules/application: conveniently install dependencies
treewide: rename stylix.testbed.ui.command.{useTerminal => terminal}
v0: 1e3df8b
treewide: simplify and standardize testbeds
has only been partially tested.Notify Maintainers