Skip to content

Commit

Permalink
Update index state to 2022-05-14T00:00:00Z
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed May 15, 2022
1 parent c99e216 commit f7c8fe2
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- run `nix flake lock --update-input hackageNix` after updating index-state.
index-state: 2022-05-09T00:00:00Z
index-state: 2022-05-14T00:00:00Z

packages:
cardano-api
Expand Down
13 changes: 6 additions & 7 deletions cardano-node-chairman/test/Main.hs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{-# LANGUAGE FlexibleInstances #-}

{-# OPTIONS_GHC -Wno-deprecations #-} -- TODO Fix deprecations
{-# LANGUAGE OverloadedStrings #-}

module Main
( main
Expand All @@ -20,11 +19,11 @@ import qualified Spec.Network

tests :: IO T.TestTree
tests = do
let t0 = H.testProperty "isPortOpen False" Spec.Network.hprop_isPortOpen_False
let t1 = H.testProperty "isPortOpen True" Spec.Network.hprop_isPortOpen_True
let t2 = H.testProperty "chairman" Spec.Chairman.Byron.hprop_chairman
let t3 = H.testProperty "chairman" Spec.Chairman.Cardano.hprop_chairman
let t4 = H.testProperty "chairman" Spec.Chairman.Shelley.hprop_chairman
let t0 = H.testPropertyNamed "isPortOpen False" "isportopen-true" Spec.Network.hprop_isPortOpen_False
let t1 = H.testPropertyNamed "isPortOpen True" "isportopen-false" Spec.Network.hprop_isPortOpen_True
let t2 = H.testPropertyNamed "chairman Byron" "chairman-byron" Spec.Chairman.Byron.hprop_chairman
let t3 = H.testPropertyNamed "chairman Cardano" "chairman-cardano" Spec.Chairman.Cardano.hprop_chairman
let t4 = H.testPropertyNamed "chairman Shelley" "chairman-shell" Spec.Chairman.Shelley.hprop_chairman

pure $ T.testGroup "test/Spec.hs"
[ T.testGroup "Spec"
Expand Down
9 changes: 4 additions & 5 deletions cardano-testnet/test/Main.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE ImportQualifiedPost #-}

{-# OPTIONS_GHC -Wno-deprecations #-} -- TODO Fix deprecations
{-# LANGUAGE OverloadedStrings #-}

module Main
( main
Expand All @@ -20,11 +19,11 @@ import Test.Util qualified as H
tests :: IO TestTree
tests = pure $ T.testGroup "test/Spec.hs"
[ T.testGroup "Spec"
[ H.ignoreOnWindows "Shutdown" Spec.Node.Shutdown.hprop_shutdown
, H.ignoreOnWindows "ShutdownOnSlotSynced" Spec.ShutdownOnSlotSynced.hprop_shutdownOnSlotSynced
[ H.ignoreOnWindows "Spec.Node.Shutdown" "Spec.Node.Shutdown" Spec.Node.Shutdown.hprop_shutdown
, H.ignoreOnWindows "Spec.ShutdownOnSlotSynced" "Spec.ShutdownOnSlotSynced" Spec.ShutdownOnSlotSynced.hprop_shutdownOnSlotSynced
-- Ignored on Windows due to <stdout>: commitBuffer: invalid argument (invalid character)
-- as a result of the kes-period-info output to stdout.
, H.ignoreOnWindows "kes-period-info" Spec.Cli.KesPeriodInfo.hprop_kes_period_info
, H.ignoreOnWindows "Spec.Cli.KesPeriodInfo" "Spec.Cli.KesPeriodInfo" Spec.Cli.KesPeriodInfo.hprop_kes_period_info
]
]

Expand Down
21 changes: 11 additions & 10 deletions cardano-testnet/test/Test/Util.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ module Test.Util
) where

import Data.Bool (bool)
import Hedgehog (Property)
import Hedgehog (Property, PropertyName)
import Hedgehog.Extras.Stock.OS (isWin32)
import Prelude
import Test.Tasty (TestName)
import Test.Tasty.ExpectedFailure (wrapTest)
import Test.Tasty.Providers (testPassed)
import Test.Tasty.Runners (TestTree, Result(resultShortDescription))
Expand All @@ -20,17 +21,17 @@ import qualified System.Info as SYS

type Os = String

ignoreOnWindows :: String -> Property -> TestTree
ignoreOnWindows pName prop =
bool id (ignoreOn "Windows") isWin32 $ H.testProperty pName prop
ignoreOnWindows :: TestName -> PropertyName -> Property -> TestTree
ignoreOnWindows name propName prop =
bool id (ignoreOn "Windows") isWin32 $ H.testPropertyNamed name propName prop

ignoreOnMac :: String -> Property -> TestTree
ignoreOnMac pName prop =
bool id (ignoreOn "MacOS") isMacOS $ H.testProperty pName prop
ignoreOnMac :: TestName -> PropertyName -> Property -> TestTree
ignoreOnMac name propName prop =
bool id (ignoreOn "MacOS") isMacOS $ H.testPropertyNamed name propName prop

ignoreOnMacAndWindows :: String -> Property -> TestTree
ignoreOnMacAndWindows pName prop =
bool id (ignoreOn "MacOS and Windows") (isMacOS || isWin32) $ H.testProperty pName prop
ignoreOnMacAndWindows :: TestName -> PropertyName -> Property -> TestTree
ignoreOnMacAndWindows name propName prop =
bool id (ignoreOn "MacOS and Windows") (isMacOS || isWin32) $ H.testPropertyNamed name propName prop

isMacOS :: Bool
isMacOS = SYS.os == "darwin"
Expand Down

0 comments on commit f7c8fe2

Please sign in to comment.