-
Notifications
You must be signed in to change notification settings - Fork 214
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
Wallet Backend builds and tests on Windows #703
Comments
How to test cardano-wallet-jormungandr on Windows
|
717: Fix windows build r=craigem a=rvl Relates to #703 # Overview - I broke the cross build in 7208a54. This fixes it, and adds a necessary DLL to the packages. - In the course of writing instructions for testing the windows build, I made a script which packages all the dependencies and configs together in a zip file. This is easy to download off Hydra and quick to test. # Comments - [Link to Hydra build](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-717/cardano-wallet-jormungandr-win64/latest) - [zip download](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-717/cardano-wallet-jormungandr-win64/latest/download-by-type/file/binary-dist) Co-authored-by: Rodney Lorrimar <[email protected]>
Can someone give a clear albeit concise status update on Windows builds? In particular, answers to the following questions:
I've got the impression that many things are happening in background but I can't clearly see what because nothing seem to be really tracked and discussions are happening.. Somewhere else. There are PR pending with no descriptions, and it's very hard to follow. Thank you very much 🙏 |
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]>
906: nix: Update windows jormungandr version and the instructions r=piotr-iohk a=rvl Relates to #703. # Overview Updates the instructions for `nix/jormungandr.nix` to include the windows binary release. Co-authored-by: Rodney Lorrimar <[email protected]>
914: Fix text locale encoding issues on windows r=KtorZ a=rvl Relates to #703. # Overview - Forces the current windows console into UTF-8 mode. - UTF-8 is far from standard on windows. But it shouldn't be assumed on any platform. - This fixes strange characters appearing on windows and test failures with exceptions related to encoding. Co-authored-by: Rodney Lorrimar <[email protected]>
888: Update Haskell.nix r=KtorZ a=rvl Relates to #703. # Overview - [x] Updates the Haskell.nix version so that we can build for windows again. - [x] Keeps more or less the same structure as before - i.e. no IFD, no niv. I don't want too much change at once. - [x] Does however update nixpkgs from iohk fork of 18.09 → upstream 19.03. - [x] Provides a big bundle of scripts and tests that can be run on Windows. [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888) [Hercules jobset](https://hercules-ci.com/github/input-output-hk/cardano-wallet) [Link to download Windows testing bundle for PR #888](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-888/cardano-wallet-jormungandr-win64/latest) [Link to download Windows testing bundle (master branch)](https://hydra.iohk.io/job/Cardano/cardano-wallet/cardano-wallet-jormungandr-win64/latest) # Comments @angerman Please help - [x] Fix failure for missing `hsc2hs` - [x] Fix a previous mistake that affects cross builds (failing to cross-compile bash for some reason) - [x] Worked around an [evaluation error](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888#tabs-errors) because weeder and ghci are no longer available from `pkgs.haskellPackages`. - [ ] Evaluation is taking a rather long time (5+ hours) in Hydra. - [ ] Some of the Buildkite pipeline steps don't work with the updated Haskell.nix. # Next PRs - [ ] Fix failures in sqlite tests on Windows. - [ ] Fix failure in launch command on Windows. - [ ] Fix the UTF-8 text issues on Windows ⇒ #914. - [ ] Add code which tells the windows command prompt to interpret ANSI color codes. - [ ] Identify other test failures and fix. Co-authored-by: Rodney Lorrimar <[email protected]>
888: Update Haskell.nix r=KtorZ a=rvl Relates to #703. # Overview - [x] Updates the Haskell.nix version so that we can build for windows again. - [x] Keeps more or less the same structure as before - i.e. no IFD, no niv. I don't want too much change at once. - [x] Does however update nixpkgs from iohk fork of 18.09 → upstream 19.03. - [x] Provides a big bundle of scripts and tests that can be run on Windows. [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888) [Hercules jobset](https://hercules-ci.com/github/input-output-hk/cardano-wallet) [Link to download Windows testing bundle for PR #888](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-888/cardano-wallet-jormungandr-win64/latest) [Link to download Windows testing bundle (master branch)](https://hydra.iohk.io/job/Cardano/cardano-wallet/cardano-wallet-jormungandr-win64/latest) # Comments @angerman Please help - [x] Fix failure for missing `hsc2hs` - [x] Fix a previous mistake that affects cross builds (failing to cross-compile bash for some reason) - [x] Worked around an [evaluation error](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888#tabs-errors) because weeder and ghci are no longer available from `pkgs.haskellPackages`. - [ ] Evaluation is taking a rather long time (5+ hours) in Hydra. - [ ] Some of the Buildkite pipeline steps don't work with the updated Haskell.nix. # Next PRs - [ ] Fix failures in sqlite tests on Windows. - [ ] Fix failure in launch command on Windows. - [ ] Fix the UTF-8 text issues on Windows ⇒ #914. - [ ] Add code which tells the windows command prompt to interpret ANSI color codes. - [ ] Identify other test failures and fix. Co-authored-by: Rodney Lorrimar <[email protected]>
888: Update Haskell.nix r=KtorZ a=rvl Relates to #703. # Overview - [x] Updates the Haskell.nix version so that we can build for windows again. - [x] Keeps more or less the same structure as before - i.e. no IFD, no niv. I don't want too much change at once. - [x] Does however update nixpkgs from iohk fork of 18.09 → upstream 19.03. - [x] Provides a big bundle of scripts and tests that can be run on Windows. [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888) [Hercules jobset](https://hercules-ci.com/github/input-output-hk/cardano-wallet) [Link to download Windows testing bundle for PR #888](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-888/cardano-wallet-jormungandr-win64/latest) [Link to download Windows testing bundle (master branch)](https://hydra.iohk.io/job/Cardano/cardano-wallet/cardano-wallet-jormungandr-win64/latest) # Comments @angerman Please help - [x] Fix failure for missing `hsc2hs` - [x] Fix a previous mistake that affects cross builds (failing to cross-compile bash for some reason) - [x] Worked around an [evaluation error](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888#tabs-errors) because weeder and ghci are no longer available from `pkgs.haskellPackages`. - [ ] Evaluation is taking a rather long time (5+ hours) in Hydra. - [ ] Some of the Buildkite pipeline steps don't work with the updated Haskell.nix. - [ ] Tests for windows are built not not executed. The tests should be run under wine. # Next PRs - [ ] Fix failures in sqlite tests on Windows ⇒ #918. - [ ] Fix failure in launch command on Windows. - [ ] Fix the UTF-8 text issues on Windows ⇒ #914. - [ ] Add code which tells the windows command prompt to interpret ANSI color codes. - [ ] Identify other test failures and fix. 952: review golden tests for legacy transaction and generate witnesses using jcli r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> N/A # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have reviewed the legacy transaction golden tests, now fully using jcli to also generate the witnesses (this feature was missing when the golden tests were initially implemented). - [x] I have updated the comment on private key to reflect the real format expected by jcli # Comments <!-- Additional comments or screenshots to attach if any --> A bit disappointing to some extend since nothing really has changed.. It seems that we were already providing the right output :( <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: Michael Bishop <[email protected]> Co-authored-by: KtorZ <[email protected]>
888: Update Haskell.nix r=KtorZ a=rvl Relates to #703. # Overview - [x] Updates the Haskell.nix version so that we can build for windows again. - [x] Keeps more or less the same structure as before - i.e. no IFD, no niv. I don't want too much change at once. - [x] Does however update nixpkgs from iohk fork of 18.09 → upstream 19.03. - [x] Provides a big bundle of scripts and tests that can be run on Windows. [Hydra jobset](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888) [Hercules jobset](https://hercules-ci.com/github/input-output-hk/cardano-wallet) [Link to download Windows testing bundle for PR #888](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-888/cardano-wallet-jormungandr-win64/latest) [Link to download Windows testing bundle (master branch)](https://hydra.iohk.io/job/Cardano/cardano-wallet/cardano-wallet-jormungandr-win64/latest) # Comments @angerman Please help - [x] Fix failure for missing `hsc2hs` - [x] Fix a previous mistake that affects cross builds (failing to cross-compile bash for some reason) - [x] Worked around an [evaluation error](https://hydra.iohk.io/jobset/Cardano/cardano-wallet-pr-888#tabs-errors) because weeder and ghci are no longer available from `pkgs.haskellPackages`. - [ ] Evaluation is taking a rather long time (5+ hours) in Hydra. - [ ] Some of the Buildkite pipeline steps don't work with the updated Haskell.nix. - [ ] Tests for windows are built not not executed. The tests should be run under wine. # Next PRs - [ ] Fix failures in sqlite tests on Windows ⇒ #918. - [ ] Fix failure in launch command on Windows. - [ ] Fix the UTF-8 text issues on Windows ⇒ #914. - [ ] Add code which tells the windows command prompt to interpret ANSI color codes. - [ ] Identify other test failures and fix. Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: Michael Bishop <[email protected]>
918: Fix Sqlite DB on Windows r=rvl a=rvl Relates to #703. Based on the branch of #888. # Overview The wallet failed with: NUL: openFile: does not exist (No such file or directory) This is due to runMigrationSilent which uses the silently library: http://hackage.haskell.org/package/silently-1.2.5.1/docs/src/System.IO.Silently.html#line-27 To fix, we swap `runMigrationQuiet` for `runMigrationSilent` on Windows. Co-authored-by: KtorZ <[email protected]> Co-authored-by: iohk-bors[bot] <43231472+iohk-bors[bot]@users.noreply.github.com> Co-authored-by: Rodney Lorrimar <[email protected]>
918: Fix Sqlite DB on Windows r=rvl a=rvl Relates to #703. Based on the branch of #888. # Overview The wallet failed with: NUL: openFile: does not exist (No such file or directory) This is due to runMigrationSilent which uses the silently library: http://hackage.haskell.org/package/silently-1.2.5.1/docs/src/System.IO.Silently.html#line-27 To fix, we swap `runMigrationQuiet` for `runMigrationSilent` on Windows. Co-authored-by: Rodney Lorrimar <[email protected]>
918: Fix Sqlite DB on Windows r=rvl a=rvl Relates to #703. Based on the branch of #888. # Overview The wallet failed with: NUL: openFile: does not exist (No such file or directory) This is due to runMigrationSilent which uses the silently library: http://hackage.haskell.org/package/silently-1.2.5.1/docs/src/System.IO.Silently.html#line-27 To fix, we swap `runMigrationQuiet` for `runMigrationSilent` on Windows. Co-authored-by: Rodney Lorrimar <[email protected]>
958: nix: Add necessary test data files to windows testing bundle r=rvl a=rvl Relates to #703. # Overview - Includes test data in the zip file so that tests can pass. - Fixes `launch.bat` - Updates the Haskell.nix revision so that it's on the master branch, not a PR branch. # Comments Testing procedure is in #703. Co-authored-by: Rodney Lorrimar <[email protected]>
957: cli: ANSI colour for windows 10, and easier utf-8 setup r=rvl a=rvl Relates to #703. # Overview IOHK logging framework uses ANSI control codes for colouring its output (instead of the Win32-specific method). Windows console does not interpret ANSI colour codes unless told to (even then, it's only supported under win 10). - Enables ANSI colour at startup ([System.Console.ANSI](http://hackage.haskell.org/package/ansi-terminal-0.10.1/docs/System-Console-ANSI.html#v:hSupportsANSIWithoutEmulation)). - There is a better way of setting UTF-8 on Windows - [code-page package](http://hackage.haskell.org/package/code-page-0.2/docs/System-IO-CodePage.html#v:withCP65001). Co-authored-by: Rodney Lorrimar <[email protected]>
959: LauncherSpec: Let it work on Windows r=rvl a=rvl Relates to #703. # Overview - LauncherSpec used posix commands for testing. - This substitutes equivalent commands when running on windows. Co-authored-by: Rodney Lorrimar <[email protected]>
971: tests: Fix ServerSpec and SqliteSpec on windows r=KtorZ a=rvl Relates to #703. # Overview Windows unit test fixes. - Let ServerSpec error path tests pass. - Close temp file so that SqliteSpec passes. # Comments Cross-compiled tests are not yet automatically run under Haskell.nix with Wine (cc @angerman @hamishmack). So am testing with: ``` nix-env -f '<nixpkgs>' -iA pkgs.wineWowPackages.minimal wine $(nix-build release.nix -A x86_64-pc-mingw32.tests.cardano-wallet-core.unit.x86_64-linux)/cardano-wallet-core-2019.11.6/unit.exe ``` Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
981: Make API Golden tests filenames compatible with Windows r=rvl a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #703 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have revised api golden test filenames generation to only use alpha-num characters - [x] I have re-generated all api golden tests # Comments <!-- Additional comments or screenshots to attach if any --> ``` $ ls AddressAmountTestnet.json ApiNetworkTip.json ApiTimeReference.json ApiTWalletId.json ByronWalletPostData.json ApiAddressTestnet.json ApiStakePool.json ApiTPassphraseencryption.json ApiTWalletName.json PostTransactionDataTestnet.json ApiBlockReference.json ApiStakePoolMetrics.json ApiTransactionTestnet.json ApiTWalletPassphraseInfo.json PostTransactionFeeDataTestnet.json ApiByronWallet.json ApiTAddressPoolGap.json ApiTSyncProgress.json ApiTxId.json WalletPostData.json ApiByronWalletMigrationInfo.json ApiTAddressProxyNetworkDiscriminantTestnet.json ApiTTxStatus.json ApiUtxoStatistics.json WalletPutData.json ApiFee.json ApiTDirection.json ApiTWalletBalance.json ApiWallet.json WalletPutPassphraseData.json ApiNetworkInformation.json ApiTHashTx.json ApiTWalletDelegationApiTPoolId.json ApiWalletPassphrase.json ``` <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <[email protected]>
981: Make API Golden tests filenames compatible with Windows r=rvl a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #703 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have revised api golden test filenames generation to only use alpha-num characters - [x] I have re-generated all api golden tests # Comments <!-- Additional comments or screenshots to attach if any --> ``` $ ls AddressAmountTestnet.json ApiNetworkTip.json ApiTimeReference.json ApiTWalletId.json ByronWalletPostData.json ApiAddressTestnet.json ApiStakePool.json ApiTPassphraseencryption.json ApiTWalletName.json PostTransactionDataTestnet.json ApiBlockReference.json ApiStakePoolMetrics.json ApiTransactionTestnet.json ApiTWalletPassphraseInfo.json PostTransactionFeeDataTestnet.json ApiByronWallet.json ApiTAddressPoolGap.json ApiTSyncProgress.json ApiTxId.json WalletPostData.json ApiByronWalletMigrationInfo.json ApiTAddressProxyNetworkDiscriminantTestnet.json ApiTTxStatus.json ApiUtxoStatistics.json WalletPutData.json ApiFee.json ApiTDirection.json ApiTWalletBalance.json ApiWallet.json WalletPutPassphraseData.json ApiNetworkInformation.json ApiTHashTx.json ApiTWalletDelegationApiTPoolId.json ApiWalletPassphrase.json ``` <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: KtorZ <[email protected]>
975: Fix bench-db on windows r=KtorZ a=rvl Relates to #703. # Overview The database benchmark was failing with: ``` cardano-wallet-core-2019.11.6-bench-db.exe: C:\users\rodney\Temp\benf0f5.db: DeleteFile "\\\\?\\C:\\users\\rodney\\Temp\\benf0f5.db": permission denied (Sharing violation.) ``` And: ``` db.exe: <stdout>: commitBuffer: invalid argument (Invalid argument) ``` It works on windows but not under wine (encoding problem). 980: Move delegation certificate declaration in a separate table r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #913 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have moved tracking of delegation "certificate" into a separate SQLite table - [x] I have adjusted `readWalletMetadata` to now pull the delegation status from the right table - [x] I have added a `putDelegationCertificate` function to insert a new row in the database when new certificates are discovered - [x] I have extended the state-machine tests accordingly, with proper tagging # Comments <!-- Additional comments or screenshots to attach if any --> ``` Cardano.Wallet.DB.Sqlite Sqlite State machine tests Sequential +++ OK, passed 400 tests: 65.8% UnsuccessfulReadTxHistory 57.8% SuccessfulReadCheckpoint 57.2% CreateThenList 55.0% TxUnsortedInputs 54.8% TxUnsortedOutputs 49.0% CreateWalletTwice 32.5% ReadTxHistoryAfterDelete 28.5% PutCheckpointTwice 27.8% UnsuccessfulReadCheckpoint 24.8% ReadMetaAfterPutCert 22.5% CreateThreeWallets 18.5% RemovePendingTxTwice 17.5% RolledBackOnce 14.2% SuccessfulReadPrivateKey 13.2% SuccessfulReadTxHistory 12.0% RemoveWalletTwice Parallel # PENDING: No reason given Sqlite State machine (RndState) Sequential state machine tests +++ OK, passed 400 tests: 65.8% UnsuccessfulReadTxHistory 57.8% SuccessfulReadCheckpoint 57.2% CreateThenList 55.0% TxUnsortedInputs 54.8% TxUnsortedOutputs 49.0% CreateWalletTwice 32.5% ReadTxHistoryAfterDelete 28.5% PutCheckpointTwice 27.8% UnsuccessfulReadCheckpoint 24.8% ReadMetaAfterPutCert 22.5% CreateThreeWallets 18.5% RemovePendingTxTwice 17.5% RolledBackOnce 14.2% SuccessfulReadPrivateKey 13.2% SuccessfulReadTxHistory 12.0% RemoveWalletTwice ``` <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]>
974: tests: Fix Network.Wai.Middleware.LoggingSpec on Windows r=KtorZ a=rvl Relates to #703. # Overview ``` test/unit/Network/Wai/Middleware/LoggingSpec.hs:109:5: 9) Network.Wai.Middleware.Logging, Logging Middleware, GET, 200, no query uncaught exception: IOException of type UserError user error (Expected exactly 3 log entries but got 1: [LogObject {loName = "request-0", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Info, privacy = Public}, loContent = LogMessage "[GET] /get"}]) To rerun use: --match "/Network.Wai.Middleware.Logging/Logging Middleware/GET, 200, no query/" test/unit/Network/Wai/Middleware/LoggingSpec.hs:117:5: 10) Network.Wai.Middleware.Logging, Logging Middleware, GET, 200, with query uncaught exception: IOException of type UserError user error (Expected exactly 3 log entries but got 5: [LogObject {loName = "request-0", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Info, privacy = Public}, loContent = LogMessage "200 OK in 0s"},LogObject {loName = "request-0", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Debug, privacy = Public}, loContent = LogMessage "14"},LogObject {loName = "request-1", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Info, privacy = Public}, loContent = LogMessage "[GET] /get?query=patate"},LogObject {loName = "request-1", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Info, privacy = Public}, loContent = LogMessage "200 OK in 0s"},LogObject {loName = "request-1", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Debug, privacy = Public}, loContent = LogMessage "14"}]) To rerun use: --match "/Network.Wai.Middleware.Logging/Logging Middleware/GET, 200, with query/" test/unit/Network/Wai/Middleware/LoggingSpec.hs:184:13: 11) Network.Wai.Middleware.Logging, Logging Middleware, different request ids Falsifiable (after 4 tests and 6 shrinks): NumberOfRequests 1 expected: 1 but got: 48 To rerun use: --match "/Network.Wai.Middleware.Logging/Logging Middleware/different request ids/" test/unit/Network/Wai/Middleware/LoggingSpec.hs:198:13: 12) Network.Wai.Middleware.Logging, Logging Middleware, correct time measures Falsifiable (after 1 test): (NumberOfRequests 5,RandomIndex 1) expected: 1 but got: 0 To rerun use: --match "/Network.Wai.Middleware.Logging/Logging Middleware/correct time measures/" Randomized with seed 534946986 Finished in 629.7711 seconds 915 examples, 12 failures, 1 pending C:\Users\win\cw> ``` - This "fixes" the tests on windows. - "different request ids" test still fails # Comments It seems like iohk-monitoring writes its logs asynchronously. Or there is some other race condition with the TVar containing log messages. Co-authored-by: Rodney Lorrimar <[email protected]>
974: tests: Fix Network.Wai.Middleware.LoggingSpec on Windows r=rvl a=rvl Relates to #703. # Overview ``` test/unit/Network/Wai/Middleware/LoggingSpec.hs:109:5: 9) Network.Wai.Middleware.Logging, Logging Middleware, GET, 200, no query uncaught exception: IOException of type UserError user error (Expected exactly 3 log entries but got 1: [LogObject {loName = "request-0", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Info, privacy = Public}, loContent = LogMessage "[GET] /get"}]) To rerun use: --match "/Network.Wai.Middleware.Logging/Logging Middleware/GET, 200, no query/" test/unit/Network/Wai/Middleware/LoggingSpec.hs:117:5: 10) Network.Wai.Middleware.Logging, Logging Middleware, GET, 200, with query uncaught exception: IOException of type UserError user error (Expected exactly 3 log entries but got 5: [LogObject {loName = "request-0", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Info, privacy = Public}, loContent = LogMessage "200 OK in 0s"},LogObject {loName = "request-0", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Debug, privacy = Public}, loContent = LogMessage "14"},LogObject {loName = "request-1", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Info, privacy = Public}, loContent = LogMessage "[GET] /get?query=patate"},LogObject {loName = "request-1", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Info, privacy = Public}, loContent = LogMessage "200 OK in 0s"},LogObject {loName = "request-1", loMeta = LOMeta {tstamp = 2019-11-05 04:43:05.8652477 UTC, tid = "ThreadId 13863", severity = Debug, privacy = Public}, loContent = LogMessage "14"}]) To rerun use: --match "/Network.Wai.Middleware.Logging/Logging Middleware/GET, 200, with query/" test/unit/Network/Wai/Middleware/LoggingSpec.hs:184:13: 11) Network.Wai.Middleware.Logging, Logging Middleware, different request ids Falsifiable (after 4 tests and 6 shrinks): NumberOfRequests 1 expected: 1 but got: 48 To rerun use: --match "/Network.Wai.Middleware.Logging/Logging Middleware/different request ids/" test/unit/Network/Wai/Middleware/LoggingSpec.hs:198:13: 12) Network.Wai.Middleware.Logging, Logging Middleware, correct time measures Falsifiable (after 1 test): (NumberOfRequests 5,RandomIndex 1) expected: 1 but got: 0 To rerun use: --match "/Network.Wai.Middleware.Logging/Logging Middleware/correct time measures/" Randomized with seed 534946986 Finished in 629.7711 seconds 915 examples, 12 failures, 1 pending C:\Users\win\cw> ``` - This "fixes" the tests on windows. - "different request ids" test still fails # Comments It seems like iohk-monitoring writes its logs asynchronously. Or there is some other race condition with the TVar containing log messages. Co-authored-by: Rodney Lorrimar <[email protected]>
986: LauncherSpec: Check that all launched processes do exit r=KtorZ a=rvl Relates to #703. # Overview It appears that the `jormungandr` node backend process was not getting cleaned up on Windows and that actions which are supposed to run concurrently with the backend were not running. These extra tests check that the [`withCreateProcess`](http://hackage.haskell.org/package/process-1.6.6.0/docs/System-Process.html#v:withCreateProcess) function takes care of terminating the process -- if it is given a chance (i.e. if the process is not killed with -9, or "End Task" on Windows). It also checks that the concurrent actions run while the backend process is running, and that the backend process is terminated when the other action completes. Finally, it implements a workaround for the unwanted behaviour of the `process` library on Windows where `waitForProcess` seems to block all concurrent async actions in the thread. - [x] Adds a test to `cardano-wallet-launcher:test:unit` for process clean up. - [x] Adjusts commands used so that the tests can be run under Wine. - [x] Adds an assertion to check that the process is killed if the action does not complete. - [x] Adds an assertion to check that the the process is killed promptly if the action completes. - [x] Fixes async blocking issue on Windows. ### Testing under Wine Use something like this: ``` wine $(nix-build release.nix -A x86_64-pc-mingw32.tests.cardano-wallet-launcher.unit.x86_64-linux -o launcher-unit-windows)/cardano-wallet-launcher-2019.11.7/unit.exe --match "Backend process" ``` Co-authored-by: Rodney Lorrimar <[email protected]>
1016: Unit tests passing on both Windows and Wine r=KtorZ a=rvl Relates to #703. # Overview Fixes/disables some of the last tests that were failing on Windows for Microsoft reasons. 1017: Update stylish-haskell to latest (v0.9.4.4) r=KtorZ a=rvl Updates stylish-haskell to the latest. I mistakenly thought that the latest version in a Stackage LTS would be recent and downgraded it before. To test: ``` nix-shell --run "stylish-haskell --version" ``` Co-authored-by: Rodney Lorrimar <[email protected]>
1015: nix: Make a separate testing bundle for windows r=KtorZ a=rvl Relates to #703. # Overview - Moves the test executables and test data out of the windows release zip and into a separate archive. # Comments - [release job](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-1015/cardano-wallet-jormungandr-win64/latest) - [testing bundle job](https://hydra.iohk.io/job/Cardano/cardano-wallet-pr-1015/cardano-wallet-jormungandr-tests-win64/latest) Co-authored-by: Rodney Lorrimar <[email protected]>
1011: Can run Windows integration tests under Wine r=rvl a=rvl Relates to #703. # Overview - [ ] It's possible to execute `cardano-wallet-jormungandr:test:integration` under Wine. # Comments The tests run on Windows but there is something weird going on with Wine. ![2019-11-12-14-30-53-wine-integration-tests](https://user-images.githubusercontent.com/1019641/68679174-19e1db00-05ab-11ea-9c62-8a30e2807f77.png) To build and run the tests under wine, use: ``` wine $(nix-build release.nix -A x86_64-pc-mingw32.tests.cardano-wallet-jormungandr.integration.x86_64-linux -o integration-windows)/cardano-wallet-jormungandr-2019.11.7/integration.exe ``` 1028: Fix the initial sleep delay in the chain following r=KtorZ a=Anviking # Issue Number #1027 # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - [x] I have changed the initial sleep delay from `0` to `1 s`. # Comments - Minor downside: we sleep for the initial delay on startup. <!-- Additional comments or screenshots to attach if any --> <!-- Don't forget to: ✓ Self-review your changes to make sure nothing unexpected slipped through ✓ Assign yourself to the PR ✓ Assign one or several reviewer(s) ✓ Once created, link this PR to its corresponding ticket ✓ Acknowledge any changes required to the Wiki --> Co-authored-by: Rodney Lorrimar <[email protected]> Co-authored-by: KtorZ <[email protected]> Co-authored-by: Johannes Lund <[email protected]>
@rvl How are we doing with wine tests execution here? Wine doesn't work for me locally for a.. mysterious reason and as far as I can see, the Hydra job doesn't really work either. |
We are waiting for execution of wine tests to be put back - input-output-hk/haskell.nix#316. Currently it builds the test suite for windows but does not run it, so it's always green in Hydra. I don't know what version and configuration of wine you were using. But the version used in the nix build is capable of running the test suite and |
I am using the "default" one from aptitude on Ubuntu 18.04, so it's probably not the most recent version as usual ^^" ... |
1109: Test.Utils.Paths: Fix the test data directory for Windows and Nix r=rvl a=rvl # Issue Number #703 # Overview When running tests under either Windows or Nix, we want the test data directory to be relative to the current directory, rather than an absolute path. # Comments Tests pass on Windows: - [x] `cardano-wallet-core-2019.11.18-test-unit.exe` - [x] `cardano-wallet-jormungandr-2019.11.18-test-unit.exe` - [ ] `cardano-wallet-jormungandr-2019.11.18-test-integration.exe` (_running_) - [x] `cardano-wallet-launcher-2019.11.18-test-unit.exe` - [x] `cardano-wallet-cli-2019.11.18-test-unit.exe` - [x] `bech32-2019.11.18-bech32-test.exe` - [x] `text-class-2019.11.18-test-unit.exe` Co-authored-by: Rodney Lorrimar <[email protected]>
1109: Test.Utils.Paths: Fix the test data directory for Windows and Nix r=KtorZ a=rvl # Issue Number #703 # Overview When running tests under either Windows or Nix, we want the test data directory to be relative to the current directory, rather than an absolute path. # Comments Tests pass on Windows: - [x] `cardano-wallet-core-2019.11.18-test-unit.exe` - [x] `cardano-wallet-jormungandr-2019.11.18-test-unit.exe` - [ ] `cardano-wallet-jormungandr-2019.11.18-test-integration.exe` (_running_) - [x] `cardano-wallet-launcher-2019.11.18-test-unit.exe` - [x] `cardano-wallet-cli-2019.11.18-test-unit.exe` - [x] `bech32-2019.11.18-bech32-test.exe` - [x] `text-class-2019.11.18-test-unit.exe` Co-authored-by: Rodney Lorrimar <[email protected]>
Does it mean that tests are running on wine in CI? |
Whoops. My bad, I messed up when setting up the GH board |
Context
cardano-wallet
ultimately results in two binaries as detailed in the root .cabal:Both are command-lines and web server doing "wallet backend stuff", but working with different chain producers.
Decision
At the moment, our CI only produces binary artifacts for linux machines yet, most are using Windows and OSX machines so we ought to be able to produce executables for these targets too. Ideally, our test suites should also run on both platform to ensure that code produced works as expected on these platforms.
The focus is given on
cardano-wallet-jormungandr
forcardano-wallet-http-bridge
will be removed soon enough and will not see the lights of production.Acceptance Criteria
cardano-wallet-jormungandr
must compile to Windowscardano-wallet-core:test:unit
must pass on Windowscardano-wallet-cli:test:unit
must pass on Windowscardano-wallet-launcher:test:unit
must pass on Windowsbech32:test:unit
must pass on Windowscardano-wallet-jormungandr:test:unit
must pass on Windowscardano-wallet-jormungandr:test:integration
must pass on Windowscardano-wallet-core:benchmark:db
should pass on WindowsDevelopment Plan
Fix failure in launch command on Windows.(is no longer an issue)cardano-wallet-core:test:unit
(failing tests)Cardano.Wallet.Api.ServerSpec
⇒ tests: Fix ServerSpec and SqliteSpec on windows #971cardano-wallet-launcher:test:unit
fails due to use of posix commands in tests ⇒ LauncherSpec: Let it work on Windows #959.cardano-wallet-jormungandr:test:integration
can run under Wine ⇒ Can run Windows integration tests under Wine #1011.QA
Checking for windows builds and tests in CI
x86_64-pc-mingw32
jobs for the packages listed in the AC are green.required
job is green.required
job. These should includex86_64-pc-mingw32
jobs for the packages listed in the AC.Running tests on windows
c:\cardano-wallet-jormungandr
is removed.launch.bat
,cw.bat
,jm.bat
.cardano-wallet-jormungandr.exe
yourself.tests.bat
..exe
files.Building windows testing bundle locally
nix-build release.nix -A cardano-wallet-jormungandr-tests-win64 && ls ./result
Running tests with Wine
The text was updated successfully, but these errors were encountered: