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/tests: add jbake #40421

Merged
merged 1 commit into from May 16, 2018
Merged

nixos/tests: add jbake #40421

merged 1 commit into from May 16, 2018

Conversation

moaxcp
Copy link
Contributor

@moaxcp moaxcp commented May 13, 2018

Motivation for this change

Adding test to prevent bot upgrades from causing issues.

Things done

tested with nix-build nixos/tests/jbake.nix

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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/)
  • Fits CONTRIBUTING.md.

$machine->waitForUnit("default.target");

my $expected = "JBake v${pkgs.jbake.version}";
my $result = $machine->succeed("jbake");
Copy link
Member

@Mic92 Mic92 May 13, 2018

Choose a reason for hiding this comment

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

This is not testing a service. We do not have yet the test derivations as proposed by @Profpatsch.
However what you could add to development/tools/jbake/default.nix is:

{ # ...
checkPhase = ''
  jbake | grep -q "${version}" || (echo "jbake did not return correct version"; exit 1)
'';
doCheck = true;
}

Copy link
Member

Choose a reason for hiding this comment

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

This will be also seen during build time, while for the test we have to remember that it exists.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks! This would probably have been easier. When do nixos/tests get run?

Copy link
Member

Choose a reason for hiding this comment

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

When nixos/release.nix is build on hydra as part of the nixos jobset.

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

4 participants