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

Run tests in nix release build #766

Merged
merged 12 commits into from
Oct 24, 2019
Merged

Run tests in nix release build #766

merged 12 commits into from
Oct 24, 2019

Conversation

rvl
Copy link
Contributor

@rvl rvl commented Sep 29, 2019

Relates to #703 and #704.
Base branch is #864 - this should be merged first.

Overview

  • This enables test suites under the Nix build.
  • Fixes test cases that used symlinks.
  • Cardano.Wallet.Api.TypesSpec is trying to access a file /build/core/../../specifications/api/swagger.yaml which is outside of its package.
  • Some tests in cardano-wallet-jormungandr:test:integration required jcli.
  • Some tests in cardano-wallet-jormungandr:test:integration required a writable home directory.
  • In LauncherSpec the test scripts used /usr/bin/env, which is not in the nix-build sandbox, so i made the tests not need external scripts.
  • Adds macOS tests to the Hydra required jobs.

Hydra jobset

Comments

  • Symlinks/references to files in other packages won't work with the nix build because when it builds it copies the package source tree to /build and builds from there.

Remaining failures

These windows-specific failures can be fixed in the next PR.

  • x86_64-pc-mingw32.tests.cardano-wallet-jormungandr.unit.x86_64-linux expects UTF-8 encoding, but this is not the encoding that Wine is using.
  • Windows cross build got broken. We now require a fix for Haskell.nix.
  • cardano-wallet-jormungandr.exe would fail on windows at startup with
    NUL: openFile: does not exist (No such file or directory)
    

@rvl rvl requested a review from angerman September 29, 2019 05:56
@rvl rvl self-assigned this Sep 29, 2019
@rvl rvl mentioned this pull request Oct 12, 2019
1 task
@rvl rvl changed the base branch from master to rvl/863/daedalus October 21, 2019 05:56
@rvl
Copy link
Contributor Author

rvl commented Oct 22, 2019

Here is a screenshot of the startup error I was getting before.

VirtualBox_Win10 Clone_22_10_2019_17_36_40

Currently the windows cross build is not working. It was working before. We need to update the Haskell.nix version to fix it.

@rvl rvl force-pushed the rvl/703/nix-run-tests branch 3 times, most recently from b346c52 to 680afa3 Compare October 22, 2019 12:06
@rvl rvl changed the title wip: Run tests in nix release build Run tests in nix release build Oct 22, 2019
@rvl rvl requested review from KtorZ and a team October 22, 2019 12:11
@rvl
Copy link
Contributor Author

rvl commented Oct 22, 2019

@KtorZ @angerman The tests pass under nix-build now on Linux and macOS, so this is ready to review. We can address the windows build in the next PR.

@rvl rvl changed the base branch from rvl/863/daedalus to master October 22, 2019 13:41
Copy link
Member

@KtorZ KtorZ left a comment

Choose a reason for hiding this comment

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

dev / code parts LGTM. Can't tell about the Nix machinery...

Copy link

@craigem craigem left a comment

Choose a reason for hiding this comment

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

Lools good to me.

@rvl
Copy link
Contributor Author

rvl commented Oct 24, 2019

bors r+

iohk-bors bot added a commit that referenced this pull request Oct 24, 2019
766: Run tests in nix release build r=rvl a=rvl

Relates to #703 and #704.
Base branch is #864 - this should be merged first.

# Overview

- [x] This enables test suites under the Nix build.
- [x] Fixes test cases that used symlinks.
- [x] `Cardano.Wallet.Api.TypesSpec` is trying to access a file `/build/core/../../specifications/api/swagger.yaml` which is outside of its package. 
- [x] Some tests in `cardano-wallet-jormungandr:test:integration` required `jcli`.
- [x] Some tests in `cardano-wallet-jormungandr:test:integration` required a writable home directory.
- [x] In LauncherSpec the test scripts used `/usr/bin/env`, which is not in the nix-build sandbox, so i made the tests not need external scripts.
- [x] Adds macOS tests to the Hydra required jobs.

[Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-766)

# Comments

- Symlinks/references to files in other packages won't work with the nix build because when it builds it copies the package source tree to `/build` and builds from there.

# Remaining failures

These windows-specific failures can be fixed in the next PR.

- [ ] `x86_64-pc-mingw32.tests.cardano-wallet-jormungandr.unit.x86_64-linux` expects UTF-8 encoding, but this is not the encoding that Wine is using.
- [ ] Windows cross build got broken. We now require a fix for Haskell.nix.
- [ ] `cardano-wallet-jormungandr.exe` would fail on windows at startup with
  ```
  NUL: openFile: does not exist (No such file or directory)
  ```


Co-authored-by: Rodney Lorrimar <[email protected]>
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Oct 24, 2019

Build succeeded

@iohk-bors iohk-bors bot merged commit d25adc6 into master Oct 24, 2019
@rvl rvl deleted the rvl/703/nix-run-tests branch October 24, 2019 06:01
@KtorZ KtorZ added this to the Usability & Compatibility milestone Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants