Skip to content

Refactor NixOS test wiring and improve eval efficiency #55798

Closed

Description

@roberth

Issue description

Actionable item from #50301

NixOS could reuse pkgs in pkgs.nixosTest to achieve an evaluation speedup. I also think we should have some tests that exercise the 'normal' modules/misc/nixpkgs.nix functionality, so perhaps all-tests.nix should then have access to two runners: an efficient one and a 'standalone' one.

Excerpt from Ekleog comment:

The objective is:

  • When you invoke nix-build nixos/tests/foo.nix, then it'll default to importing ../...
  • When you invoke nix-build nixos/release.nix -A tests.foo, then it'll default to, in nixos/release.nix, importing ./.. and using it in tests.foo (and using the same import for all tests if you -A tests, even though that's likely to fail because lots of tests are broken).
  • When you invoke nix-build -E '(import <nixpkgs> { overlays = [ ./overlay.nix ]; }).foo.tests, it'll defer to nixosTests.foo (from the same nixpkgs), which will call the test with the same overlay'd nixpkgs.

For the complete discussion, see #50301

Activity

  1. added
    0.kind: enhancement
    6.topic: nixos
    on Feb 15, 2019
  2. added
    6.topic: testing
    on Apr 28, 2019
  3. stale commented on Jun 2, 2020

    @stale

    Thank you for your contributions.

    This has been automatically marked as stale because it has had no activity for 180 days.

    If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

    Here are suggestions that might help resolve this more quickly:

    1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
    2. Ask on the NixOS Discourse.
    3. Ask on the #nixos channel on irc.freenode.net.
  4. added
    2.status: stale
    on Jun 2, 2020
  5. fgaz commented on Jan 11, 2021

    @fgaz
    Member

    Probably still important, stale-bot

  6. removed
    2.status: stale
    on Jan 11, 2021
  7. stale commented on Jul 11, 2021

    @stale

    I marked this as stale due to inactivity. → More info

  8. added
    2.status: stale
    on Jul 11, 2021
  9. roberth commented on Sep 1, 2026

    @roberth
    MemberAuthor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: enhancement2.status: stale6.topic: nixos6.topic: testing

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions