Skip to content

Comments

nixosTests.nixos-test-driver: init#157161

Open
Synthetica9 wants to merge 10 commits intoNixOS:masterfrom
Synthetica9:test-driver-tests-minimal
Open

nixosTests.nixos-test-driver: init#157161
Synthetica9 wants to merge 10 commits intoNixOS:masterfrom
Synthetica9:test-driver-tests-minimal

Conversation

@Synthetica9
Copy link
Member

Motivation for this change

Added minimal changes to make it properly testable, mostly adding a timeout option to functions.

cc @marijanp @tfc

Minimal version of #154168

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@Synthetica9 Synthetica9 requested a review from tfc as a code owner January 28, 2022 16:04
@github-actions github-actions bot added the 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS label Jan 28, 2022
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jan 28, 2022
Copy link
Contributor

Choose a reason for hiding this comment

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

we could wrap this script using wrapProgram, adding all the runtime-dependencies to the PATH, moreover passing the to be mutated path using an argument, and use wrapPrograms -set to set it to the path.

Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect this is for future work

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, currently waiting for console text that never shows up breaks the cooperative multitasking model we use for polling_condition. Not for this PR tho.

Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this commented out?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because wait_for_console_text did something else than I initially thought, and I haven't found a good way to test it yet.

@Synthetica9 Synthetica9 force-pushed the test-driver-tests-minimal branch 2 times, most recently from 827216c to c57dfed Compare February 16, 2022 15:11
@Synthetica9 Synthetica9 force-pushed the test-driver-tests-minimal branch from c57dfed to 3be1f44 Compare February 22, 2022 13:36
@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 21, 2022
Copy link
Member

@roberth roberth left a comment

Choose a reason for hiding this comment

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

This is awesome.

I've refactored the nixos test expressions to be module based, requiring a small rebase of the (small) testing-python.nix part. I hope my suggestion is useful.

@stale stale bot removed 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md labels Sep 28, 2022
@RaitoBezarius RaitoBezarius force-pushed the test-driver-tests-minimal branch from 3be1f44 to 9a60710 Compare October 23, 2023 12:52
@RaitoBezarius RaitoBezarius force-pushed the test-driver-tests-minimal branch from 9a60710 to aee8500 Compare October 23, 2023 15:08
@RaitoBezarius RaitoBezarius requested a review from roberth October 23, 2023 16:02
Copy link
Member

Choose a reason for hiding this comment

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

This is actually incorrect… In auto-uid-allocation, nixbld does not appear in the username.

Copy link
Member

Choose a reason for hiding this comment

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

Not sure I understand the intent here.

@RaitoBezarius RaitoBezarius force-pushed the test-driver-tests-minimal branch 2 times, most recently from 2eef95f to c40d354 Compare October 23, 2023 16:29
@RaitoBezarius RaitoBezarius force-pushed the test-driver-tests-minimal branch from c40d354 to cc14a62 Compare October 24, 2023 00:44
@RaitoBezarius
Copy link
Member

@ofborg test nixos-test-driver.driver

@RaitoBezarius RaitoBezarius force-pushed the test-driver-tests-minimal branch from cc14a62 to 92beab7 Compare October 30, 2023 16:12
@RaitoBezarius RaitoBezarius force-pushed the test-driver-tests-minimal branch from 92beab7 to 4e8bd51 Compare October 30, 2023 16:15
@RaitoBezarius
Copy link
Member

@ofborg test nixos-test-driver.driver

black --check --diff .
'';

passthru.tests = nixosTests.nixos-test-driver.driver;
Copy link
Member

Choose a reason for hiding this comment

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

I was thinking:

Suggested change
passthru.tests = nixosTests.nixos-test-driver.driver;
passthru.tests = nixosTests.nixos-test-driver;

(Resuming thread #157161 (comment))

Copy link
Member

Choose a reason for hiding this comment

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

Ah, why not, actually.

@wegank wegank added the 2.status: merge conflict This PR has merge conflicts with the target branch label Mar 20, 2024
@wegank wegank added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: merge conflict This PR has merge conflicts with the target branch 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 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: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

5 participants