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

virtualbox: Change the virtualbox tests to not build the unfree tests by default #45415

Merged
merged 1 commit into from Aug 28, 2018

Conversation

cdepillabout
Copy link
Member

@cdepillabout cdepillabout commented Aug 21, 2018

Motivation for this change

This PR changes the VirtualBox tests not to build the unfree tests by default.

The problem was that cache.nixos.org was running the tests, which caused the VirtualBox Oracle Extension Pack to be downloaded and cached. cache.nixos.org was then serving the Extension Pack to people when they tried to download it.

However, the license for the Extension Pack explicitly states that it cannot be served by third parties.

This PR changes the code for the VirtualBox test to not build and run the unfree tests by default. This causes cache.nixos.org to not build and cache the Extension Pack.

The VirtualBox tests can be run like the following:

$ cd nixos/tests
$ nix-build virtualbox.nix

This will only build and run the normal tests.

In order to build and run the unfree test, you must use the following command:

$ nix-build virtualbox.nix -A enable-extension-pack --arg enableUnfree true

If you try to run the enable-extension-pack test without setting the enableUnfree argument to true, you will get the following error:

$ nix-build virtualbox.nix -A enable-extension-pack
error: attribute 'enable-extension-pack' in selection path 'enable-extension-pack' not found
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.

@cdepillabout
Copy link
Member Author

Pinging @flokli and @zimbatm since they helped a lot with the previous PR. Also pinging @aszlig, who pointed out the bug this PR fixes.

@xeji
Copy link
Contributor

xeji commented Aug 22, 2018

@GrahamcOfBorg test virtualbox

@GrahamcOfBorg
Copy link

Success on aarch64-linux

Attempted: tests.virtualbox

No partial log is available.

@GrahamcOfBorg
Copy link

Success on x86_64-linux

Attempted: tests.virtualbox

No partial log is available.

@xeji
Copy link
Contributor

xeji commented Aug 22, 2018

Hm, that went a little too fast for a real test to have run.

Copy link
Contributor

@xeji xeji left a comment

Choose a reason for hiding this comment

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

Thank you! Tested locally, runs fine.

@xeji xeji merged commit 7d23ffb into NixOS:master Aug 28, 2018
@cdepillabout cdepillabout deleted the put-virtualbox-tests-behind-flag branch August 29, 2018 01:50
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