Skip to content

Instantly share code, notes, and snippets.

@mpenick
Created August 18, 2014 20:24
Show Gist options
  • Save mpenick/481d30685079289cfdd9 to your computer and use it in GitHub Desktop.
Save mpenick/481d30685079289cfdd9 to your computer and use it in GitHub Desktop.
#!/bin/bash
RUN="/usr/bin/valgrind.bin --tool=memcheck test/integration_tests/cassandra_integration_tests"
#RUN="/usr/bin/valgrind --leak-check=full --tool=memcheck test/integration_tests/cassandra_integration_tests"
#RUN="test/integration_tests/cassandra_integration_tests"
function run_test() {
echo -e "$(tput setaf 3)#### Running filter: '$1' ####$(tput sgr 0)";
#export DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib
#export MALLOC_STRICT_SIZE=1
#export MALLOC_FILL_SPACE=1
$RUN --run_test="$1";
local status=$?
if [ $status -ne 0 ]; then
echo -e "$(tput setaf 1)#### Failed with filter '$1' ####$(tput sgr 0)";
else
echo -e "$(tput setaf 2)#### Success with filter '$1' ####$(tput sgr 0)";
fi
}
LLDB_FILE="/tmp/cpp_driver_lldb_commands"
LLDB_CMDS="env DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib
env MALLOC_STRICT_SIZE=1
env MALLOC_FILL_SPACE=1
"
#DEBUG="lldb -s ${LLDB_FILE} -- ${RUN}"
DEBUG="gdb --args ${RUN}"
echo "${LLDB_CMDS}" > ${LLDB_FILE}
function debug_test() {
echo -e "$(tput setaf 3)#### Running filter: '$1' ####$(tput sgr 0)";
$DEBUG --run_test="$1";
}
#debug_test "version1/*"
#debug_test "stress/parallel_insert_and_select_with_nodes_failing"
#run_test "future_callbacks/test_result"
#run_test "async/*"
#run_test "authentication/*"
#run_test "basics/*"
#run_test "by_name/*"
#run_test "batch/*"
#run_test "collections/*"
#run_test "config/*"
#run_test "consistency/*"
#run_test "future_callbacks/*"
#run_test "iterators/*"
run_test "load_balancing/*"
#run_test "logging/*"
#run_test "paging/*"
#run_test "prepared/*"
#run_test "prepared_outage/*"
#run_test "serial_consistency/*"
#run_test "sessions/*"
#run_test "version1/*"
#run_test "version1_downgrade/*"
#run_test "stress/*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment