Commit a90ba04a authored by Valentin Reis's avatar Valentin Reis

Updating the default pipeline to work with the 'config' WIP branch

of the nrm daemon, as this really the intended workflow.
parent ad4f3fee
Pipeline #4594 passed with stage
in 15 seconds
.argo_nodeos_config_exit_message
*.log
......@@ -46,9 +46,7 @@ data StackArgs = StackArgs
, cmd_err :: FilePath
, daemon_out :: FilePath
, daemon_err :: FilePath
, log_progress :: FilePath
, log_hardwareprogress :: FilePath
, log_power :: FilePath
, nrm_log :: FilePath
, time_file :: FilePath }
instance Default StackArgs where
......@@ -60,13 +58,10 @@ instance Default StackArgs where
, cmd_err = "cmd_err.log"
, daemon_out = "daemon_out.log"
, daemon_err = "daemon_err.log"
, log_progress = "progress.log"
, log_hardwareprogress = "hardwareprogress.log"
, log_power = "power.log"
, nrm_log = "nrm.log"
, time_file = "time.log"
}
colorShell :: Color -> Shell ()-> Shell ()
colorShell color s = setC color *> s *> setC White
where setC c = liftIO $ setSGR [SetColor Foreground Dull c]
......@@ -104,8 +99,7 @@ cleanLog = sudoRemoveFile printWarning "log file"
argoTest :: StackArgs -> IO ()
argoTest StackArgs{..} = sh $ do
--Cleaning
mapM_ cleanLog [daemon_out, daemon_err, cmd_out, cmd_err, time_file,
log_progress, log_hardwareprogress, log_power]
mapM_ cleanLog [daemon_out, daemon_err, cmd_out, cmd_err, time_file, nrm_log]
mapM_ cleanSocket ["/tmp/nrm-downstream-in", "/tmp/nrm-upstream-in"]
--Retrieving binaries,setting suid bits and perms
......@@ -131,8 +125,8 @@ argoTest StackArgs{..} = sh $ do
die ("Clean config failed with exit code " <> repr n)
printInfo "Running the daemon.\n"
export "ARGO_NODEOS_CONFIG" (format fp confPath')
let daemon = inshell (format (fp%" "%s%" --log_hardwareprogress="%fp%" --log_progress="%fp%" --log_power="%fp%" >"%fp%" 2>"%fp)
daemonPath dargs log_hardwareprogress log_progress log_power daemon_out daemon_err) empty
let daemon = inshell (format (fp%" "%s%" --nrm_log="%fp%" >"%fp%" 2>"%fp)
daemonPath dargs nrm_log daemon_out daemon_err) empty
daemonAsync <- fork $ sh $ daemon
printInfo "Daemon is running.\n"
let handler = do
......
......@@ -28,3 +28,9 @@ integration.test:
tags:
- integration
```
Standalone usage: example with the nrm source in `../`.
```
nix-shell -A test --arg nrm-src ../nrm
./integration.hs
```
......@@ -23,7 +23,6 @@ in rec
src=./.;
name="nrm-experimental-dev-environment";
buildInputs = [
argopkgs.sudo
containers
amg
nrm
......
#! /usr/bin/env bash
nix-shell --pure -A test --command ./integration.hs
nix-shell -A test --command ./integration.hs
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