Skip to content

Commit

Permalink
Update cardano-node-chairman with new path construction functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jimbo4350 committed Jun 5, 2023
1 parent dd83171 commit 6bdea25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cardano-node-chairman/test/Spec/Chairman/Chairman.hs
Expand Up @@ -22,6 +22,7 @@ import qualified System.Environment as IO
import qualified System.IO as IO
import qualified System.Process as IO

import Cardano.Testnet (TmpAbsolutePath (TmpAbsolutePath), makeLogDir)
import qualified Cardano.Testnet as H

{- HLINT ignore "Reduce duplication" -}
Expand All @@ -34,7 +35,9 @@ mkSprocket tempBaseAbsPath socketDir node = Sprocket tempBaseAbsPath (socketDir
chairmanOver :: Int -> Int -> H.Conf -> [String] -> Integration ()
chairmanOver timeoutSeconds requiredProgress H.Conf {..} allNodes = do
maybeChairman <- H.evalIO $ IO.lookupEnv "DISABLE_CHAIRMAN"

let logDir = makeLogDir $ TmpAbsolutePath tempAbsPath
tempBaseAbsPath = H.makeTmpBaseAbsPath $ TmpAbsolutePath tempAbsPath
socketDir = H.makeSocketDir $ TmpAbsolutePath tempAbsPath
when (maybeChairman /= Just "1") $ do
nodeStdoutFile <- H.noteTempFile logDir $ "chairman" <> ".stdout.log"
nodeStderrFile <- H.noteTempFile logDir $ "chairman" <> ".stderr.log"
Expand Down
2 changes: 1 addition & 1 deletion cardano-node-chairman/testnet/Testnet/Run.hs
Expand Up @@ -27,7 +27,7 @@ testnetProperty :: Maybe Int -> (H.Conf -> H.Integration ()) -> H.Property
testnetProperty maybeTestnetMagic tn = H.integrationRetryWorkspace 2 "testnet-chairman" $ \tempAbsPath' -> do
base <- H.note =<< H.noteIO . IO.canonicalizePath =<< H.getProjectBase
configurationTemplate <- H.noteShow $ base </> "configuration/defaults/byron-mainnet/configuration.yaml"
conf <- H.mkConf (Just $ H.YamlFilePath configurationTemplate) tempAbsPath' maybeTestnetMagic
conf <- H.mkConf Nothing tempAbsPath' maybeTestnetMagic

-- Fork a thread to keep alive indefinitely any resources allocated by testnet.
void . liftResourceT . resourceForkIO . forever . liftIO $ IO.threadDelay 10000000
Expand Down

0 comments on commit 6bdea25

Please sign in to comment.