Commit f56272d2 authored by Valentin Reis's avatar Valentin Reis

Adds direnv

parent ca247ef7
Pipeline #5051 passed with stage
in 2 minutes and 26 seconds
use_nix
(import ./default.nix {}).hack
...@@ -98,7 +98,7 @@ prepareDaemon out stdErr test = do ...@@ -98,7 +98,7 @@ prepareDaemon out stdErr test = do
then do then do
printWarning printWarning
"the argo_nodeos_config call did not remove containers, \ "the argo_nodeos_config call did not remove containers, \
\at least not fast enough. Retrying.." \at least not fast enough. Retrying.."
liftIO $ sleep retryTime liftIO $ sleep retryTime
cleanContainers argo_nodeos_config cleanContainers argo_nodeos_config
(retryTime * 2) (retryTime * 2)
...@@ -230,7 +230,7 @@ runStack sa@StackArgs {..} = do ...@@ -230,7 +230,7 @@ runStack sa@StackArgs {..} = do
tracebackList <- procsWithTracebacks ilist tracebackList <- procsWithTracebacks ilist
r <- case snd out of r <- case snd out of
(_, Left (PatternMatched line)) -> case tracebackList of (_, Left (PatternMatched line)) -> case tracebackList of
[] -> return $ FoundMessage line [] -> return $ FoundMessage line
t -> return $ FoundTracebacks t t -> return $ FoundTracebacks t
......
...@@ -47,10 +47,10 @@ data TestType = ...@@ -47,10 +47,10 @@ data TestType =
| TestListen | TestListen
| TestPerfwrapper | TestPerfwrapper
| TestPower | TestPower
| TestAMG
| TestSTREAM | TestSTREAM
| RunAMG | RunAMG
| RunSTREAM deriving (Enum,Bounded,Show) | RunSTREAM
| RunLAMMPS deriving (Enum,Bounded,Show)
data TestSpec = TestSpec data TestSpec = TestSpec
{ stackArgsUpdate :: StackArgs -> StackArgs { stackArgsUpdate :: StackArgs -> StackArgs
...@@ -174,38 +174,6 @@ configureTest = \case ...@@ -174,38 +174,6 @@ configureTest = \case
|] |]
, isTest = IsTest , isTest = IsTest
} }
TestAMG -> TestSpec
{ stackArgsUpdate = \sa -> sa
{ manifestName = "parallel.json"
, app = AppName "mpiexec"
, args = [ AppArg "-n"
, AppArg "24"
, AppArg "amg"
, AppArg "-problem"
, AppArg "2"
, AppArg "-n"
, AppArg "1"
, AppArg "1"
, AppArg "1"
, AppArg "-P"
, AppArg "8"
, AppArg "3"
, AppArg "1"
]
, daemon = daemonBehavior
, cmdrun = runBehavior
, cmdlistenprogress = listenprogresstestBehavior
(TestText
(TextBehaviorStdout (WaitFor "progress"))
(TextBehaviorStderr ExpectClean)
)
}
, description = [text|
Setup stack, run AMG and check that it sends
at least one progress message to the daemon.
|]
, isTest = IsTest
}
TestSTREAM -> TestSpec TestSTREAM -> TestSpec
{ stackArgsUpdate = \sa -> sa { stackArgsUpdate = \sa -> sa
{ app = AppName "stream_c_20" { app = AppName "stream_c_20"
...@@ -241,6 +209,30 @@ configureTest = \case ...@@ -241,6 +209,30 @@ configureTest = \case
, AppArg "1" , AppArg "1"
] ]
RunSTREAM -> runAppSpec (AppName "stream_c_20000") [] RunSTREAM -> runAppSpec (AppName "stream_c_20000") []
RunLAMMPS -> TestSpec
{ stackArgsUpdate = \sa -> sa
{ app = (AppName "mpirun")
, args =
let (ManifestDir d) = manifestDir sa
Right p = toText (d </> "in.lj")
in [ AppArg "-n"
, AppArg "24"
, AppArg "lmp_serial"
, AppArg "-i"
, AppArg $ p
]
, manifestName = "parallel.json"
, daemon = daemonBehavior
, cmdrun = runBehavior
, cmdlistenperformance = JustRun (StdOutLog "performance.csv")
(StdErrLog "performance.log")
, cmdlistenpower = JustRun (StdOutLog "power.csv") (StdErrLog "power.log")
, cmdlistenprogress = JustRun (StdOutLog "progress.csv")
(StdErrLog "progress.log")
}
, description = "Set up and start daemon, run app in a container."
, isTest = NotTest
}
where where
runAppSpec appName appArgs = TestSpec runAppSpec appName appArgs = TestSpec
{ stackArgsUpdate = \sa -> sa { stackArgsUpdate = \sa -> sa
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment