Skip to content

Nixos integration test ports#72835

Merged
worldofpeace merged 4 commits intoNixOS:masterfrom
tfc:nixos-integration-test-ports
Nov 7, 2019
Merged

Nixos integration test ports#72835
worldofpeace merged 4 commits intoNixOS:masterfrom
tfc:nixos-integration-test-ports

Conversation

@tfc
Copy link
Copy Markdown
Contributor

@tfc tfc commented Nov 5, 2019

Motivation for this change

Processing the task list in issue #72828.

Things done
  • implemented require_active_unit, get_window_names, and wait_for_window.

  • ported the tests matrix-synapse.nix and firefox.nix

  • 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 nix-review --run "nix-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.

Notify maintainers

cc @flokli @marijanp

@ofborg ofborg bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Nov 5, 2019
@tfc tfc force-pushed the nixos-integration-test-ports branch from eae00cd to 3974329 Compare November 5, 2019 15:27
@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 Nov 5, 2019
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably is internal API, so _get_window_names?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm... this thinking is very policy-like. Why suggest the user that this is only for internal use, if it is perfectly safe to call from test scripts?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we inline the window_is_visible function in a lambda here maybe?
Is that log line present in the perl code too?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i had the impression that multi-line-lambdas are considered bad style in python. the log line is present in the perl code, yes.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably rename this to require_unit_state, with an optional parameter defaulting to active.

@worldofpeace
Copy link
Copy Markdown
Contributor

worldofpeace commented Nov 5, 2019

With 45b339b I can port all the DE tests and installed tests for gnome to the python driver.
(unless you've done this locally already 😄 )

@tfc
Copy link
Copy Markdown
Contributor Author

tfc commented Nov 5, 2019

With 45b339b I can port all the DE tests and installed tests for gnome to the python driver.
(unless you've done this locally already 😄 )

Not yet, but it would make sense to ask in #nixos-python-test-driver on freenode if someone is on test X already... had some clashes in the past days. :-D

@tfc
Copy link
Copy Markdown
Contributor Author

tfc commented Nov 6, 2019

@domenkozar

@worldofpeace worldofpeace merged commit 3780b9e into NixOS:master Nov 7, 2019
@tfc tfc deleted the nixos-integration-test-ports branch November 7, 2019 06:42
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this pull request Nov 7, 2019
Nixos integration test ports

(cherry picked from commit 3780b9e)
with self.nested(
"checking if unit ‘{}’ has reached state '{}'".format(unit, require_state)
):
info = self.get_unit_info(unit)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be allowed to accept user also? (like wait_for_unit)

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.

4 participants