summaryrefslogtreecommitdiff
path: root/src/Run.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2024-09-29 14:26:21 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2024-10-04 19:42:00 +0200
commit321859ab1fe4a6b1f3cc7084b8836474ff872e2b (patch)
tree1aa66ed593d18150a2fcd1a59677837a205ff202 /src/Run.hs
parent61304d829c2cd4d6edf3c015adae24d0574ce7a5 (diff)
User-defined test functions without parameters
Diffstat (limited to 'src/Run.hs')
-rw-r--r--src/Run.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Run.hs b/src/Run.hs
index b67c287..1cb04bb 100644
--- a/src/Run.hs
+++ b/src/Run.hs
@@ -33,8 +33,8 @@ import Run.Monad
import Test
import Test.Builtins
-runTest :: Output -> TestOptions -> Test -> IO Bool
-runTest out opts test = do
+runTest :: Output -> TestOptions -> Test -> [ ( VarName, SomeVarValue ) ] -> IO Bool
+runTest out opts test variables = do
let testDir = optTestDir opts
when (optForce opts) $ removeDirectoryRecursive testDir `catchIOError` \e ->
if isDoesNotExistError e then return () else ioError e
@@ -60,7 +60,7 @@ runTest out opts test = do
}
tstate = TestState
{ tsNetwork = error "network not initialized"
- , tsVars = builtins
+ , tsVars = builtins ++ variables
, tsNodePacketLoss = M.empty
, tsDisconnectedUp = S.empty
, tsDisconnectedBridge = S.empty