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
a90ba04a
Commit
a90ba04a
authored
Dec 10, 2018
by
Valentin Reis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Changes
5
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
13 deletions
+13
-13
.gitignore
.gitignore
+1
-0
Argotest.hs
Argotest.hs
+5
-11
README.md
README.md
+6
-0
default.nix
default.nix
+0
-1
integration.sh
integration.sh
+1
-1
No files found.
.gitignore
View file @
a90ba04a
.argo_nodeos_config_exit_message
.argo_nodeos_config_exit_message
*.log
Argotest.hs
View file @
a90ba04a
...
@@ -46,9 +46,7 @@ data StackArgs = StackArgs
...
@@ -46,9 +46,7 @@ data StackArgs = StackArgs
,
cmd_err
::
FilePath
,
cmd_err
::
FilePath
,
daemon_out
::
FilePath
,
daemon_out
::
FilePath
,
daemon_err
::
FilePath
,
daemon_err
::
FilePath
,
log_progress
::
FilePath
,
nrm_log
::
FilePath
,
log_hardwareprogress
::
FilePath
,
log_power
::
FilePath
,
time_file
::
FilePath
}
,
time_file
::
FilePath
}
instance
Default
StackArgs
where
instance
Default
StackArgs
where
...
@@ -60,13 +58,10 @@ instance Default StackArgs where
...
@@ -60,13 +58,10 @@ instance Default StackArgs where
,
cmd_err
=
"cmd_err.log"
,
cmd_err
=
"cmd_err.log"
,
daemon_out
=
"daemon_out.log"
,
daemon_out
=
"daemon_out.log"
,
daemon_err
=
"daemon_err.log"
,
daemon_err
=
"daemon_err.log"
,
log_progress
=
"progress.log"
,
nrm_log
=
"nrm.log"
,
log_hardwareprogress
=
"hardwareprogress.log"
,
log_power
=
"power.log"
,
time_file
=
"time.log"
,
time_file
=
"time.log"
}
}
colorShell
::
Color
->
Shell
()
->
Shell
()
colorShell
::
Color
->
Shell
()
->
Shell
()
colorShell
color
s
=
setC
color
*>
s
*>
setC
White
colorShell
color
s
=
setC
color
*>
s
*>
setC
White
where
setC
c
=
liftIO
$
setSGR
[
SetColor
Foreground
Dull
c
]
where
setC
c
=
liftIO
$
setSGR
[
SetColor
Foreground
Dull
c
]
...
@@ -104,8 +99,7 @@ cleanLog = sudoRemoveFile printWarning "log file"
...
@@ -104,8 +99,7 @@ cleanLog = sudoRemoveFile printWarning "log file"
argoTest
::
StackArgs
->
IO
()
argoTest
::
StackArgs
->
IO
()
argoTest
StackArgs
{
..
}
=
sh
$
do
argoTest
StackArgs
{
..
}
=
sh
$
do
--Cleaning
--Cleaning
mapM_
cleanLog
[
daemon_out
,
daemon_err
,
cmd_out
,
cmd_err
,
time_file
,
mapM_
cleanLog
[
daemon_out
,
daemon_err
,
cmd_out
,
cmd_err
,
time_file
,
nrm_log
]
log_progress
,
log_hardwareprogress
,
log_power
]
mapM_
cleanSocket
[
"/tmp/nrm-downstream-in"
,
"/tmp/nrm-upstream-in"
]
mapM_
cleanSocket
[
"/tmp/nrm-downstream-in"
,
"/tmp/nrm-upstream-in"
]
--Retrieving binaries,setting suid bits and perms
--Retrieving binaries,setting suid bits and perms
...
@@ -131,8 +125,8 @@ argoTest StackArgs{..} = sh $ do
...
@@ -131,8 +125,8 @@ argoTest StackArgs{..} = sh $ do
die
(
"Clean config failed with exit code "
<>
repr
n
)
die
(
"Clean config failed with exit code "
<>
repr
n
)
printInfo
"Running the daemon.
\n
"
printInfo
"Running the daemon.
\n
"
export
"ARGO_NODEOS_CONFIG"
(
format
fp
confPath'
)
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
)
let
daemon
=
inshell
(
format
(
fp
%
" "
%
s
%
" --
nrm_log
="
%
fp
%
" >"
%
fp
%
" 2>"
%
fp
)
daemonPath
dargs
log_hardwareprogress
log_progress
log_power
daemon_out
daemon_err
)
empty
daemonPath
dargs
nrm_log
daemon_out
daemon_err
)
empty
daemonAsync
<-
fork
$
sh
$
daemon
daemonAsync
<-
fork
$
sh
$
daemon
printInfo
"Daemon is running.
\n
"
printInfo
"Daemon is running.
\n
"
let
handler
=
do
let
handler
=
do
...
...
README.md
View file @
a90ba04a
...
@@ -28,3 +28,9 @@ integration.test:
...
@@ -28,3 +28,9 @@ integration.test:
tags:
tags:
- integration
- integration
```
```
Standalone usage: example with the nrm source in
`../`
.
```
nix-shell -A test --arg nrm-src ../nrm
./integration.hs
```
default.nix
View file @
a90ba04a
...
@@ -23,7 +23,6 @@ in rec
...
@@ -23,7 +23,6 @@ in rec
src
=
./.
;
src
=
./.
;
name
=
"nrm-experimental-dev-environment"
;
name
=
"nrm-experimental-dev-environment"
;
buildInputs
=
[
buildInputs
=
[
argopkgs
.
sudo
containers
containers
amg
amg
nrm
nrm
...
...
integration.sh
View file @
a90ba04a
#! /usr/bin/env bash
#! /usr/bin/env bash
nix-shell
-
-pure
-
A
test
--command
./integration.hs
nix-shell
-A
test
--command
./integration.hs
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