Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
argotest
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Reis
argotest
Commits
affb0e5c
Commit
affb0e5c
authored
Dec 13, 2018
by
Valentin Reis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correcting file output.
parent
9d854fec
Pipeline
#4655
passed with stage
in 27 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
argotest/src/Argotest.hs
argotest/src/Argotest.hs
+17
-2
default.nix
default.nix
+4
-0
No files found.
argotest/src/Argotest.hs
View file @
affb0e5c
...
...
@@ -19,7 +19,8 @@ import System.Console.ANSI
import
System.Console.ANSI.Types
(
Color
)
import
System.Posix.Signals
import
System.Process
hiding
(
shell
)
import
Data.Text
hiding
(
empty
)
import
Data.Text
as
Text
hiding
(
empty
)
import
Data.Text.IO
as
Text
data
StackArgs
=
StackArgs
{
dargs
::
[
Text
]
--"Daemon arguments. Properly quote this."
...
...
@@ -112,7 +113,21 @@ prepareDaemonShell dargs daemon_out daemon_err nrm_log = do
False
->
die
(
"Clean config failed with exit code "
<>
repr
n
)
printInfo
$
format
(
"Running the daemon, main log at "
%
fp
%
", stdout at "
%
fp
%
", stderr at "
%
fp
%
"
\n
"
)
nrm_log
daemon_out
daemon_err
export
"ARGO_NODEOS_CONFIG"
(
format
fp
confPath'
)
return
$
sh
$
view
$
inprocWithErr
"daemon"
(
dargs
++
[
"--nrm_log"
,
Data
.
Text
.
pack
$
(
encodeString
nrm_log
)])
empty
return
$
twoWayPrint
daemon_out
daemon_err
$
inprocWithErr
"daemon"
(
dargs
++
[
"--nrm_log"
,
Text
.
pack
$
encodeString
nrm_log
])
empty
--twoWayPrint l
--case l of
-- Left out -> output daemon_out $ return out
-- Right err -> output daemon_err $ return err
twoWayPrint
::
FilePath
->
FilePath
->
Shell
(
Either
Line
Line
)
->
IO
()
twoWayPrint
outPath
errPath
s
=
sh
$
do
handleOut
<-
using
(
writeonly
outPath
)
handleErr
<-
using
(
writeonly
errPath
)
s
>>=
\
case
Left
out
->
liftIO
$
Text
.
hPutStrLn
handleOut
(
lineToText
out
)
Right
err
->
liftIO
$
Text
.
hPutStrLn
handleOut
(
lineToText
err
)
cmdShell
::
FilePath
->
Text
->
FilePath
->
FilePath
->
Shell
()
cmdShell
manifest
app
cmd_out
cmd_err
=
...
...
default.nix
View file @
affb0e5c
...
...
@@ -27,6 +27,10 @@ in rec
};
dev-test
=
pkgs
.
stdenv
.
mkDerivation
rec
{
shellHook
=
''
source completions/bash/argotk.sh
echo "Installed bash completions."
''
;
name
=
"env"
;
env
=
pkgs
.
buildEnv
{
name
=
name
;
paths
=
buildInputs
;
};
buildInputs
=
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment