#!/bin/sh NP=2 music_conf="$( echo "${0##*/}" | sed 's/\.test//' ).music" abspath="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")" path="`dirname $abspath`" . ${path}/run_test write_configuration () { method=$1 echo "Communication method: ${method}" # this is music configuration file cat < "${MUSIC_DATA_PATH}/${music_conf}" stoptime=0.5 [from] np=1 binary=${TEST_EXTRABINDIR}/clocksource args=-t 0.02 -b 3 [to] np=1 binary=${TEST_BINDIR}/contsink args=-t 0.03 from.clock -> to.contdata [1, ${method}] EOF } # this is the output we should expect to see cat <<\EOF > "${MUSIC_DATA_PATH}/ok" 0 on 0 @0 0.03 on 0 @0.03 0.06 on 0 @0.06 0.09 on 0 @0.09 0.12 on 0 @0.12 0.15 on 0 @0.15 0.18 on 0 @0.18 0.21 on 0 @0.21 0.24 on 0 @0.24 0.27 on 0 @0.27 0.3 on 0 @0.3 0.33 on 0 @0.33 0.36 on 0 @0.36 0.39 on 0 @0.39 0.42 on 0 @0.42 0.45 on 0 @0.45 0.48 on 0 @0.48 EOF # sort the file using locale specified by current environment sort "${MUSIC_DATA_PATH}/ok" -o "${MUSIC_DATA_PATH}/ok" cat <<\EOF > "${MUSIC_DATA_PATH}/errok" EOF for method in point-to-point collective ; do write_configuration "${method}" run_test "${NP}" "${music_conf}" exit_code=$? if test "${exit_code}" -gt 0 ; then exit "${exit_code}" fi done exit 0