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

Port tests to Python #72887

Merged
merged 15 commits into from Nov 7, 2019

Conversation

@1000101
Copy link
Member

1000101 commented Nov 6, 2019

Motivation for this change

#72828

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 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 @

@tfc
tfc approved these changes Nov 7, 2019
@mmahut

This comment has been minimized.

Copy link
Member

mmahut commented Nov 7, 2019

@GrahamcOfBorg test trickster
@GrahamcOfBorg test yabar
@GrahamcOfBorg test zookeeper
@GrahamcOfBorg test upnp
@GrahamcOfBorg test morty
@GrahamcOfBorg test moodle
@GrahamcOfBorg test xautolock
@GrahamcOfBorg test telegraf
@GrahamcOfBorg test strongswan-swanctl
@GrahamcOfBorg test snapper
@GrahamcOfBorg test radarr
@GrahamcOfBorg test redis
@GrahamcOfBorg test roundcube
@GrahamcOfBorg test rss2email
@GrahamcOfBorg test signal-desktop

@mmahut mmahut merged commit 1a65fc1 into NixOS:master Nov 7, 2019
42 checks passed
42 checks passed
tests.signal-desktop on aarch64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
tests.moodle on aarch64-linux Success
Details
tests.moodle on x86_64-linux Success
Details
tests.morty on aarch64-linux Success
Details
tests.morty on x86_64-linux Success
Details
tests.radarr on aarch64-linux Success
Details
tests.radarr on x86_64-linux Success
Details
tests.redis on aarch64-linux Success
Details
tests.redis on x86_64-linux Success
Details
tests.roundcube on aarch64-linux Success
Details
tests.roundcube on x86_64-linux Success
Details
tests.rss2email on aarch64-linux Success
Details
tests.rss2email on x86_64-linux Success
Details
tests.signal-desktop on x86_64-linux Success
Details
tests.snapper on aarch64-linux Success
Details
tests.snapper on x86_64-linux Success
Details
tests.strongswan-swanctl on aarch64-linux Success
Details
tests.strongswan-swanctl on x86_64-linux Success
Details
tests.telegraf on aarch64-linux Success
Details
tests.telegraf on x86_64-linux Success
Details
tests.trickster on aarch64-linux Success
Details
tests.trickster on x86_64-linux Success
Details
tests.upnp on aarch64-linux Success
Details
tests.upnp on x86_64-linux Success
Details
tests.xautolock on aarch64-linux Success
Details
tests.xautolock on x86_64-linux Success
Details
tests.yabar on aarch64-linux Success
Details
tests.yabar on x86_64-linux Success
Details
tests.zookeeper on aarch64-linux Success
Details
tests.zookeeper on x86_64-linux Success
Details
@andir

This comment has been minimized.

Copy link
Member

andir commented on nixos/tests/roundcube.nix in 71824d7 Nov 7, 2019

shouldn't start be called here?

cc @mmahut @1000101

This comment has been minimized.

Copy link
Member

mmahut replied Nov 8, 2019

@andir I'm not sure if I understand, can you elaborate please?

This comment has been minimized.

Copy link
Contributor

flokli replied Nov 8, 2019

roundcube.start() - here, we'll just return the module itself.

This comment has been minimized.

Copy link
Member Author

1000101 replied Nov 9, 2019

Ah, you are right, I'm going to address in in the next test port batch. Thanks!

This comment has been minimized.

Copy link
Member

andir replied Nov 9, 2019

This comment has been minimized.

Copy link
Member Author

1000101 replied Nov 9, 2019

Why didn't it fail with an obvious issue in the test code?

It's weird but the machine spins up and runs the commands... so I'd like to know, too. Moreover, shouldn't we unify the tests and run start_all() instead? There are a lot of tests where start_all() is being called although there's only a single machine. Maybe it would be good to pick a "standardized" way of doing this.

This comment has been minimized.

Copy link
Contributor

flokli replied Nov 18, 2019

self.wait_for_unit calls self.get_unit_info, which calls self.systemctl, which calls self.execute, which calls self.connect, which no-ops if it's already connected, but otherwise will start up the VM.

This matches the behaviour of the perl test driver, it probably just isn't very obvious :-)

This comment has been minimized.

Copy link
Contributor

flokli replied Nov 18, 2019

I'd wait with establishing new conventions, or changing behaviour until the tests are migrated to python - then we only need to change one driver…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.