| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
NP=6 |
| 4 |
music_conf="$( echo "${0##*/}" | sed 's/\.test//' ).music" |
| 5 |
|
| 6 |
abspath="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")" |
| 7 |
path="`dirname $abspath`" |
| 8 |
|
| 9 |
. ${path}/run_test |
| 10 |
|
| 11 |
write_configuration () |
| 12 |
{ |
| 13 |
|
| 14 |
method=$1 |
| 15 |
echo "Communication method: ${method}" |
| 16 |
|
| 17 |
# this is music configuration file |
| 18 |
cat <<EOF > "${MUSIC_DATA_PATH}/${music_conf}" |
| 19 |
binary=${TEST_EXTRABINDIR}/launchtest |
| 20 |
np=3 |
| 21 |
[1] |
| 22 |
args=hej du glade |
| 23 |
param=1.0 |
| 24 |
[2] |
| 25 |
args=ta en spade |
| 26 |
param=2.0 |
| 27 |
1.as1 -> 2.bd1 |
| 28 |
2.bd2 <- 1.as2 # asd |
| 29 |
bd2 -> 2.as2 [12,${method}] |
| 30 |
EOF |
| 31 |
|
| 32 |
} |
| 33 |
|
| 34 |
# this is the output we should expect to see |
| 35 |
cat <<\EOF > "${MUSIC_DATA_PATH}/ok" |
| 36 |
EOF |
| 37 |
# sort the file using locale specified by current environment |
| 38 |
sort "${MUSIC_DATA_PATH}/ok" -o "${MUSIC_DATA_PATH}/ok" |
| 39 |
|
| 40 |
cat <<\EOF > "${MUSIC_DATA_PATH}/errok" |
| 41 |
EOF |
| 42 |
|
| 43 |
for method in point-to-point collective ; do |
| 44 |
write_configuration "${method}" |
| 45 |
|
| 46 |
run_test "${NP}" "${music_conf}" |
| 47 |
exit_code=$? |
| 48 |
|
| 49 |
if test "${exit_code}" -gt 0 ; then |
| 50 |
exit "${exit_code}" |
| 51 |
fi |
| 52 |
done |
| 53 |
|
| 54 |
exit 0 |
| 55 |
|
| 56 |
|