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

nixos/incron: added nixos test to ensure expected behaviour #50210

Merged
merged 1 commit into from Nov 11, 2018

Conversation

aanderse
Copy link
Member

Motivation for this change

Finally got around to writing NixOS test for this module.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

@aanderse
Copy link
Member Author

@GrahamcOfBorg test incron

@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: tests.incron

Partial log (click to expand)

Cannot nix-instantiate `tests.incron' because:
error: while evaluating anonymous function at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/nixos/release.nix:25:8, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/lib/attrsets.nix:283:43:
while evaluating 'hydraJob' at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/lib/customisation.nix:157:14, called from /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/nixos/release.nix:25:16:
while evaluating the attribute 'meta' at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/lib/customisation.nix:162:24:
while evaluating the attribute 'meta' at /var/lib/gc-of-borg/.nix-test-rs/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/rbvermaa-spot/nixos/lib/testing.nix:148:9:
value is a list while a set was expected

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: tests.incron

Partial log (click to expand)

Cannot nix-instantiate `tests.incron' because:
error: while evaluating anonymous function at /var/lib/gc-of-borg/nix-test-rs-8/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-8/nixos/release.nix:25:8, called from /var/lib/gc-of-borg/nix-test-rs-8/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-8/lib/attrsets.nix:283:43:
while evaluating 'hydraJob' at /var/lib/gc-of-borg/nix-test-rs-8/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-8/lib/customisation.nix:157:14, called from /var/lib/gc-of-borg/nix-test-rs-8/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-8/nixos/release.nix:25:16:
while evaluating the attribute 'meta' at /var/lib/gc-of-borg/nix-test-rs-8/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-8/lib/customisation.nix:162:24:
while evaluating the attribute 'meta' at /var/lib/gc-of-borg/nix-test-rs-8/repo/38dca4e3aa6bca43ea96d2fcc04e8229/builder/grahamc-aarch64-community-8/nixos/lib/testing.nix:148:9:
value is a list while a set was expected

nixos/tests/incron.nix Outdated Show resolved Hide resolved
@aanderse
Copy link
Member Author

@GrahamcOfBorg test incron

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.incron

Partial log (click to expand)

machine: exit status 1
syncing
machine: running command: sync
machine: exit status 0
test script finished in 24.52s
cleaning up
killing machine (pid 597)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/37a72x3r1gfdmax58180i1nzp7binqyf-vm-test-run-incron

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tests.incron

Partial log (click to expand)

machine: exit status 1
syncing
machine: running command: sync
machine: exit status 0
test script finished in 24.72s
cleaning up
killing machine (pid 631)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/mq3fh5rhrw29vg5bxfqvlc19jv2jvcj3-vm-test-run-incron

@infinisil infinisil merged commit 316ad96 into NixOS:master Nov 11, 2018
@infinisil
Copy link
Member

Awesome thanks :)

@aanderse aanderse deleted the incron branch November 11, 2018 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants