Skip to content

Commit

Permalink
add make check test for multi-server mode
Browse files Browse the repository at this point in the history
  • Loading branch information
carns committed Nov 5, 2024
1 parent d433446 commit 96e779d
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/Makefile.subdir
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ TESTS_ENVIRONMENT += \
check_PROGRAMS +=

TESTS += \
tests/basic.sh
tests/basic.sh\
tests/multi.sh

EXTRA_DIST += \
tests/basic.sh \
tests/mochi-quintain-provider.json\
tests/quintain-benchmark-example.json
tests/quintain-benchmark-example.json\
tests/mochi-quintain-provider-2svr-A.json\
tests/mochi-quintain-provider-2svr-B.json

DISTCLEANFILES += \
test-output.gz \
Expand Down
34 changes: 34 additions & 0 deletions tests/mochi-quintain-provider-2svr-A.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"margo" : {
},
"libraries" : [
"libquintain-bedrock.so",
"libflock-bedrock-module.so"
],
"providers" : [
{
"name" : "my_quintain_provider",
"type" : "quintain",
"provider_id" : 1,
"dependencies": {
"pool" : "__primary__"
},
"config" : {}
},
{
"name" : "quintain_group",
"type" : "flock",
"provider_id" : 2,
"dependencies": {
"pool" : "__primary__"
},
"config": {
"bootstrap": "self",
"file": "./quintain.flock.json",
"group": {
"type": "centralized"
}
}
}
]
}
34 changes: 34 additions & 0 deletions tests/mochi-quintain-provider-2svr-B.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"margo" : {
},
"libraries" : [
"libquintain-bedrock.so",
"libflock-bedrock-module.so"
],
"providers" : [
{
"name" : "my_quintain_provider",
"type" : "quintain",
"provider_id" : 1,
"dependencies": {
"pool" : "__primary__"
},
"config" : {}
},
{
"name" : "quintain_group",
"type" : "flock",
"provider_id" : 2,
"dependencies": {
"pool" : "__primary__"
},
"config": {
"bootstrap": "join",
"file": "./quintain.flock.json",
"group": {
"type": "centralized"
}
}
}
]
}
20 changes: 20 additions & 0 deletions tests/multi.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -e
set -o pipefail

if [ -z $srcdir ]; then
echo srcdir variable not set.
exit 1
fi

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$PWD/src/.libs"

bedrock -c $srcdir/tests/mochi-quintain-provider-2svr-A.json na+sm:// &
sleep 2
bedrock -c $srcdir/tests/mochi-quintain-provider-2svr-B.json na+sm:// &
sleep 2

mpiexec -n 2 src/quintain-benchmark -g quintain.flock.json -j $srcdir/tests/quintain-benchmark-example.json -o test-output

bedrock-shutdown -f quintain.flock.json na+sm://

0 comments on commit 96e779d

Please sign in to comment.