Skip to content

Commit

Permalink
Merge #2726
Browse files Browse the repository at this point in the history
2726: Require more recent version of `hspec` (>= 2.8.2). r=jonathanknowles a=jonathanknowles

# Issue Number

ADP-978

# Overview

This PR upgrades `hspec` to a more recent version that supports the following options:

* `--times` prints an execution time for each individual spec.
* `--print-slow-items[=n]` prints the `n` slowest spec items at the end of a test run.

Co-authored-by: Jonathan Knowles <[email protected]>
Co-authored-by: Rodney Lorrimar <[email protected]>
  • Loading branch information
3 people authored Jun 21, 2021
2 parents ca9cbed + fce6720 commit bba0cc5
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 56 deletions.
4 changes: 2 additions & 2 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
index-state: 2021-03-11T00:00:00Z
index-state: 2021-06-18T00:00:00Z

with-compiler: ghc-8.10.4
with-compiler: ghc-8.10.5

packages:
lib/core/
Expand Down
4 changes: 2 additions & 2 deletions lib/core/cardano-wallet-core.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ test-suite unit
, foldl
, generic-arbitrary
, generic-lens
, hspec
, hspec-core
, hspec >= 2.8.2
, hspec-core >= 2.8.2
, http-api-data
, http-client
, http-client-tls
Expand Down
2 changes: 1 addition & 1 deletion nix/cabal-shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{ walletPackages ? import ../default.nix {}
, pkgs ? walletPackages.private.pkgs
# optional string argument to override compiler, e.g.
# nix-shell nix/cabal-shell.nix --argstr ghcVersion ghc8104
# nix-shell nix/cabal-shell.nix --argstr ghcVersion ghc8105
, ghcVersion ? null
# Enable building the cabal-cache util - only needed under CI
, withCabalCache ? false
Expand Down
18 changes: 9 additions & 9 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@ let
++ iohkNixMain.overlays.iohkNix
# our own overlays:
++ [
(pkgs: _: with pkgs; {
(pkgs: _: {
# commonLib: iohk-nix utils and our own:
commonLib = iohkNix
// import ./util.nix { inherit lib; }
commonLib = pkgs.iohkNix
// import ./util.nix { inherit (pkgs) lib; }
# also expose our sources and overlays
// { inherit overlays sources; };
})
# haskell build tools
(import ./build-tools-overlay.nix)
# cardano-node packages
(import ./cardano-node-overlay.nix)
# Other package overlays
(import ./pkgs.nix { inherit system crossSystem config; })
# Haskell build tools
(import ./overlays/build-tools.nix)
# Cardano deployments
(import ./overlays/cardano-deployments.nix)
# Other packages overlay
(import ./overlays/pkgs.nix)
];

pkgs = import nixpkgs {
Expand Down
10 changes: 5 additions & 5 deletions nix/build-tools-overlay.nix → nix/overlays/build-tools.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@
######################################################################

let
index-state = "2021-03-11T00:00:00Z";
index-state = "2021-06-18T00:00:00Z";
tools = {
cabal-cache.version = "1.0.2.1";
cabal-install.exe = "cabal";
cabal-install.version = "3.4.0.0";
haskell-language-server.version = "1.0.0.0";
haskell-language-server.version = "1.2.0.0";
hoogle.version = "5.0.18";
hlint.version = "3.2.1";
lentil.version = "1.3.2.0";
stylish-haskell.version = "0.11.0.3";
weeder.version = "2.1.3";
};

compiler-nix-name = "ghc8104"; # TODO: get it from the project
compiler-nix-name = "ghc8105"; # TODO: get it from the project
in

pkgs: super: let
Expand All @@ -51,7 +51,7 @@ pkgs: super: let
inherit name index-state compiler-nix-name;
} // pkgs.lib.optionalAttrs enableMaterialization {
checkMaterialization = false;
materialized = ./materialized + "/${name}";
materialized = ../materialized + "/${name}";
} // builtins.removeAttrs args ["exe"]);

# A script for updating materialized files
Expand Down Expand Up @@ -82,7 +82,7 @@ in {
inherit compiler-nix-name index-state;
} // pkgs.lib.optionalAttrs enableMaterialization {
checkMaterialization = false;
materialized = ./materialized + "/${name}";
materialized = ../materialized + "/${name}";
});
in pkgs.symlinkJoin {
inherit name;
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions nix/overlays/pkgs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# our packages overlay
self: super: {

}
9 changes: 0 additions & 9 deletions nix/pkgs.nix

This file was deleted.

30 changes: 3 additions & 27 deletions nix/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"homepage": "https://input-output-hk.github.io/haskell.nix",
"owner": "input-output-hk",
"repo": "haskell.nix",
"rev": "66f90fc17682636bfc60b8df47c075cd58599afe",
"sha256": "0ikdwdgc3gdjc16qxsjcrqbf2jn97znpdc42zbbnqp90y68zmjb5",
"rev": "37b9ce167098441561c325152f65ac0eb5ad2076",
"sha256": "1a3mmvd28jf072kvki4kk6vc6psbrbz5dss7cy4r22im0vw3ss2s",
"type": "tarball",
"url": "https:/input-output-hk/haskell.nix/archive/66f90fc17682636bfc60b8df47c075cd58599afe.tar.gz",
"url": "https:/input-output-hk/haskell.nix/archive/37b9ce167098441561c325152f65ac0eb5ad2076.tar.gz",
"url_template": "https:/<owner>/<repo>/archive/<rev>.tar.gz"
},
"iohk-nix": {
Expand All @@ -23,30 +23,6 @@
"url": "https:/input-output-hk/iohk-nix/archive/8a44dd195f0fe47ec4f0beb88840e300a09ea8a9.tar.gz",
"url_template": "https:/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": {
"branch": "master",
"description": "Easy dependency management for Nix projects",
"homepage": "https:/nmattia/niv",
"owner": "nmattia",
"repo": "niv",
"rev": "98c74a80934123cb4c3bf3314567f67311eb711a",
"sha256": "1w8n54hapd4x9f1am33icvngkqns7m3hl9yair38yqq08ffwg0kn",
"type": "tarball",
"url": "https:/nmattia/niv/archive/98c74a80934123cb4c3bf3314567f67311eb711a.tar.gz",
"url_template": "https:/<owner>/<repo>/archive/<rev>.tar.gz"
},
"nixpkgs-19.03": {
"branch": "release-19.03",
"description": "Nix Packages collection",
"homepage": null,
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a8f81dc037a5977414a356dd068f2621b3c89b60",
"sha256": "01z13axll5g5yl00lz9adr2jw2bs12g9skhbb1vxy8p7fjjbhhhm",
"type": "tarball",
"url": "https:/NixOS/nixpkgs/archive/a8f81dc037a5977414a356dd068f2621b3c89b60.tar.gz",
"url_template": "https:/<owner>/<repo>/archive/<rev>.tar.gz"
},
"sphinxcontrib-haddock": {
"branch": "master",
"builtin": false,
Expand Down
5 changes: 4 additions & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# This resolver file contains a ghc-8.10.4-based stackage LTS, with a
# This resolver file contains a ghc-8.10-based stackage LTS, with a
# released cardano-node version, and supporting libraries.
#
# NOTE: Remember to update the version matrix in README.md when
# bumping the Cardano version.
resolver: https://raw.githubusercontent.com/input-output-hk/cardano-haskell/4522834fa3a052aa8f5ed51bf89bb09242daa80b/snapshots/cardano-1.27.0.yaml
compiler: ghc-8.10.5

packages:
- lib/core
Expand All @@ -23,6 +24,8 @@ extra-deps:
- command-0.1.1
- markov-chain-usage-model-0.0.0
- quickcheck-state-machine-0.7.0
- hspec-2.8.2
- hspec-core-2.8.2

# cardano-addresses-3.5.0
- git: https:/input-output-hk/cardano-addresses
Expand Down

0 comments on commit bba0cc5

Please sign in to comment.