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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elixxir
integration
Commits
88f2a786
Commit
88f2a786
authored
Mar 29, 2018
by
Rick Carback
Browse files
Options
Downloads
Patches
Plain Diff
Convert the runclients into a function that is called twice
parent
f1fd5ba7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
basice2e/run.sh
+34
-55
34 additions, 55 deletions
basice2e/run.sh
with
34 additions
and
55 deletions
basice2e/run.sh
+
34
−
55
View file @
88f2a786
...
@@ -45,15 +45,15 @@ trap finish INT
...
@@ -45,15 +45,15 @@ trap finish INT
sleep
20
# FIXME: We should not need this, but the servers don't respond quickly
sleep
20
# FIXME: We should not need this, but the servers don't respond quickly
# enough on boot right now.
# enough on boot right now.
LASTNODE
=
"localhost:50004"
export
LASTNODE
=
"localhost:50004"
NICK1
=
"David"
export
NICK1
=
"David"
NICK2
=
"Jim"
export
NICK2
=
"Jim"
NICK3
=
"Ben"
export
NICK3
=
"Ben"
NICK4
=
"Rick"
export
NICK4
=
"Rick"
echo
"STARTING CLIENTS..."
runclients
()
{
echo
"Starting clients..."
CTR
=
0
CTR
=
0
for
cid
in
$(
seq
1 4
)
for
cid
in
$(
seq
1 4
)
do
do
# TODO: Change the recipients to send multiple messages. We can't
# TODO: Change the recipients to send multiple messages. We can't
...
@@ -79,33 +79,12 @@ do
...
@@ -79,33 +79,12 @@ do
eval echo
"Waiting on
\$
{CLIENTS
${
i
}
} ..."
eval echo
"Waiting on
\$
{CLIENTS
${
i
}
} ..."
eval wait
\$
{
CLIENTS
${
i
}
}
eval wait
\$
{
CLIENTS
${
i
}
}
done
done
}
CTR
=
0
echo
"RUNNING CLIENTS..."
for
cid
in
$(
seq
1 4
)
runclients
do
echo
"RUNNING CLIENTS (2nd time)..."
# TODO: Change the recipients to send multiple messages. We can't
runclients
# run multiple clients with the same user id so we need
# updates to make that work.
# for nid in 1 2 3 4; do
for
nid
in
1
do
nid
=
$((
(
$cid
%
4
)
+
1
))
eval
NICK
=
\$
{
NICK
${
cid
}
}
CLIENTCMD
=
"../bin/client -f blob
$cid$nid
--numnodes 5 -s
$LASTNODE
-i
$cid
-d
$nid
-m
\"
Hello,
$nid
\"
--nick
$NICK
"
eval
$CLIENTCMD
>>
$CLIENTOUT
/client
$cid$nid
.out 2>&1 &
RETVAL
=
$!
eval
CLIENTS
${
CTR
}
=
$RETVAL
echo
"
$CLIENTCMD
--
$RETVAL
"
CTR
=
$((
$CTR
+
1
))
done
done
echo
"WAITING FOR
$CTR
CLIENTS (2nd msg set) TO EXIT..."
for
i
in
$(
seq
0
$((
$CTR
-
1
))
)
do
eval echo
"Waiting on
\$
{CLIENTS
${
i
}
} ..."
eval wait
\$
{
CLIENTS
${
i
}
}
done
diff
-ruN
clients.goldoutput
$CLIENTOUT
diff
-ruN
clients.goldoutput
$CLIENTOUT
...
...
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