-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
6 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{-# LANGUAGE FlexibleContexts #-} | ||
|
||
-- | | ||
-- Copyright: © 2018-2019 IOHK | ||
-- License: Apache-2.0 | ||
-- | ||
-- Utility function for making test suites pass on Windows. | ||
|
||
module Test.Utils.Windows | ||
( skipOnWindows | ||
) where | ||
|
||
import Prelude | ||
|
||
import Control.Exception | ||
( throwIO ) | ||
import Control.Monad | ||
( when ) | ||
import System.Info | ||
( os ) | ||
import Test.Hspec.Core.Spec | ||
( ResultStatus (..) ) | ||
import Test.Hspec.Expectations | ||
( Expectation, HasCallStack ) | ||
|
||
skipOnWindows :: HasCallStack => String -> Expectation | ||
skipOnWindows _reason = when (os == "mingw32") $ throwIO Success |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.