Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
integration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
integration
Commits
b47835d2
Commit
b47835d2
authored
7 years ago
by
Rick Carback
Browse files
Options
Downloads
Patches
Plain Diff
Move server generation into a loop
parent
579c0a53
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
basice2e/run.sh
+18
-26
18 additions, 26 deletions
basice2e/run.sh
with
18 additions
and
26 deletions
basice2e/run.sh
+
18
−
26
View file @
b47835d2
...
...
@@ -4,38 +4,28 @@
set
-e
mkdir
-p
results
SERVERLOGS
=
results/servers
CLIENTOUT
=
results/clients
echo
"STARTING SERVERS..."
../bin/server
-v
-i
0
--config
server-1.yaml
>
results/server-1.console 2>&1 &
SERVER1
=
$!
echo
"../bin/server -v -i 0 --config server-1.yaml --
$SERVER1
"
../bin/server
-v
-i
1
--config
server-2.yaml
>
results/server-2.console 2>&1 &
SERVER2
=
$!
echo
"../bin/server -v -i 1 --config server-2.yaml --
$SERVER2
"
../bin/server
-v
-i
2
--config
server-3.yaml
>
results/server-3.console 2>&1 &
SERVER3
=
$!
echo
"../bin/server -v -i 2 --config server-3.yaml --
$SERVER3
"
mkdir
-p
$SERVERLOGS
mkdir
-p
$CLIENTOUT
../bin/server
-v
-i
3
--config
server-4.yaml
>
results/server-4.console 2>&1 &
SERVER4
=
$!
echo
"../bin/server -v -i 3 --config server-4.yaml --
$SERVER4
"
echo
"STARTING SERVERS..."
../bin/server
-v
-i
4
--config
server-5.yaml
>
results/server-5.console 2>&1 &
SERVER5
=
$!
echo
"../bin/server -v -i 4 --config server-5.yaml --
$SERVER5
"
for
SERVERID
in
$(
seq
1 5
)
do
IDX
=
$((
$SERVERID
-
1
))
SERVERCMD
=
"../bin/server -v -i
$IDX
--config server-
$SERVERID
.yaml"
eval
$SERVERCMD
>
$SERVERLOGS
/server-
$SERVERID
.console 2>&1 &
echo
"
$SERVERCMD
--
$!
"
done
finish
()
{
echo
"STOPPING SERVERS..."
# jobs -p
kill
$SERVER1
||
true
kill
$SERVER2
||
true
kill
$SERVER3
||
true
kill
$SERVER4
||
true
kill
$SERVER5
||
true
for
job
in
$(
jobs
-p
)
do
kill
$job
||
true
done
tail
results/
*
}
...
...
@@ -70,3 +60,5 @@ for i in $(seq 0 $(($CTR - 1))); do
eval echo
"Waiting on
\$
{CLIENTS
${
i
}
} ..."
eval wait
\$
{
CLIENTS
${
i
}
}
done
diff
-ruN
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment