Skip to content

Commit

Permalink
Updated the run_test utility script
Browse files Browse the repository at this point in the history
  • Loading branch information
matus-chochlik committed Feb 28, 2017
1 parent 2854763 commit cc3e6f7
Showing 1 changed file with 24 additions and 7 deletions.
31 changes: 24 additions & 7 deletions config/tools/run_test-oglplus
Expand Up @@ -11,17 +11,34 @@ shift
test_src_dir="$(<SOURCE_DIR)/test/${kind}/${library}"
test_bin_dir="$(dirname ${0})/test/${kind}/${library}"

function compile_test() {
make ${1}
return $?
}

function boost_test() {
if ! make ${1}
then return $?
fi
if ! ${test_bin_dir}/${1}
then return $?
fi
}

function memcheck() {
if ! make ${1}
then return $?
fi
if ! valgrind --tool=memcheck --leak-check=full ./${1}
then return $?
fi
}

cd "${test_bin_dir}" &&
for test
do
if [[ -f "${test_src_dir}/${test}.cpp" ]]
then
if make ${library}-${test}-${kind}
then
if [[ -x ${library}-${test}-${kind} ]]
then ./${library}-${test}-${kind}
fi
fi
then ${kind} ${library}-${test}-${kind}
else echo "Invalid '${library}' '${kind}' test name: '${test}'"
fi
done

0 comments on commit cc3e6f7

Please sign in to comment.