# LIBTOOLIZE
# MAKE
# PREFIX
-# TESTS_ENVIRONMENT
+# LOG_COMPILER
# VERBOSE
# WARNINGS
#
die "OLD_MAKE($OLD_MAKE) was set on push, programmer error!"
fi
- if [[ -n "$OLD_TESTS_ENVIRONMENT" ]]; then
- die "OLD_TESTS_ENVIRONMENT($OLD_TESTS_ENVIRONMENT) was set on push, programmer error!"
+ if [[ -n "$OLD_LOG_COMPILER" ]]; then
+ die "OLD_LOG_COMPILER($OLD_LOG_COMPILER) was set on push, programmer error!"
fi
if [[ -n "$CONFIGURE" ]]; then
OLD_MAKE=$MAKE
fi
- if [[ -n "$TESTS_ENVIRONMENT" ]]; then
- OLD_TESTS_ENVIRONMENT=$TESTS_ENVIRONMENT
+ if [[ -n "$LOG_COMPILER" ]]; then
+ OLD_LOG_COMPILER=$LOG_COMPILER
fi
}
MAKE=$OLD_MAKE
fi
- if [[ -n "$OLD_TESTS_ENVIRONMENT" ]]; then
- TESTS_ENVIRONMENT=$OLD_TESTS_ENVIRONMENT
+ if [[ -n "$OLD_LOG_COMPILER" ]]; then
+ LOG_COMPILER=$OLD_LOG_COMPILER
fi
OLD_CONFIGURE=
OLD_CONFIGURE_ARG=
OLD_PREFIX=
OLD_MAKE=
- OLD_TESTS_ENVIRONMENT=
+ OLD_LOG_COMPILER=
export -n CC CXX
}
# If we don't have a configure, then most likely we will be missing libtool
assert_file 'configure'
if [[ -x 'libtool' ]]; then
- TESTS_ENVIRONMENT="./libtool --mode=execute $VALGRIND_COMMAND"
+ LOG_COMPILER="./libtool --mode=execute $VALGRIND_COMMAND"
else
- TESTS_ENVIRONMENT="$VALGRIND_COMMAND"
+ LOG_COMPILER="$VALGRIND_COMMAND"
fi
make_target 'all'
else
if [[ -n "$DISPLAY" ]]; then
if command_exists 'wine'; then
- TESTS_ENVIRONMENT='wine'
+ LOG_COMPILER='wine'
fi
fi
- if [[ -n "$TESTS_ENVIRONMENT" ]]; then
+ if [[ -n "$LOG_COMPILER" ]]; then
make_target 'check' 'warn' || warn "$MAKE check failed"
ret=$?
fi
# If we don't have a configure, then most likely we will be missing libtool
assert_file 'configure'
if [[ -f 'libtool' ]]; then
- TESTS_ENVIRONMENT="./libtool --mode=execute $GDB_COMMAND"
+ LOG_COMPILER="./libtool --mode=execute $GDB_COMMAND"
else
- TESTS_ENVIRONMENT="$GDB_COMMAND"
+ LOG_COMPILER="$GDB_COMMAND"
fi
make_target 'check'
run_configure
fi
- if [ -n "$TESTS_ENVIRONMENT" ]; then
+ if [ -n "$LOG_COMPILER" ]; then
if $verbose; then
- echo "TESTS_ENVIRONMENT=$TESTS_ENVIRONMENT"
+ echo "LOG_COMPILER=$LOG_COMPILER"
fi
fi
echo "PREFIX=$PREFIX"
fi
- if [[ -n "$TESTS_ENVIRONMENT" ]]; then
- echo "TESTS_ENVIRONMENT=$TESTS_ENVIRONMENT"
+ if [[ -n "$LOG_COMPILER" ]]; then
+ echo "LOG_COMPILER=$LOG_COMPILER"
fi
if [[ -n "$VCS_CHECKOUT" ]]; then
fi
fi
- # Use OLD_TESTS_ENVIRONMENT for tracking the state of the variable
- local OLD_TESTS_ENVIRONMENT=
+ # Use OLD_LOG_COMPILER for tracking the state of the variable
+ local OLD_LOG_COMPILER=
# Set ENV PREFIX in order to set --prefix for ./configure
if [[ -n "$PREFIX" ]]; then
local OLD_CONFIGURE_ARG=
local OLD_PREFIX=
local OLD_MAKE=
- local OLD_TESTS_ENVIRONMENT=
+ local OLD_LOG_COMPILER=
# If we call autoreconf on the platform or not
local AUTORECONF_REBUILD_HOST=false
export LIBTOOLIZE_OPTIONS
export MAKE
export PREFIX_ARG
- export TESTS_ENVIRONMENT
+ export LOG_COMPILER
export VERBOSE
export WARNINGS
bool gdb_is_caller(void)
{
- if (bool(getenv("TESTS_ENVIRONMENT")) and strstr(getenv("TESTS_ENVIRONMENT"), "gdb"))
+ if (bool(getenv("LOG_COMPILER")) and strstr(getenv("LOG_COMPILER"), "gdb"))
{
return true;
}
bool helgrind_is_caller(void)
{
- if (bool(getenv("TESTS_ENVIRONMENT")) and strstr(getenv("TESTS_ENVIRONMENT"), "helgrind"))
+ if (bool(getenv("LOG_COMPILER")) and strstr(getenv("LOG_COMPILER"), "helgrind"))
{
return true;
}
LIBTOOL_COMMAND= ${abs_top_builddir}/libtool --mode=execute
VALGRIND_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=memcheck --error-exitcode=1 --leak-check=yes --track-fds=yes --malloc-fill=A5 --free-fill=DE
SGCHECK_EXEC_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1
-VALGRIND_COMMAND= TESTS_ENVIRONMENT="valgrind" $(VALGRIND_EXEC_COMMAND)
+VALGRIND_COMMAND= LOG_COMPILER="valgrind" $(VALGRIND_EXEC_COMMAND)
HELGRIND_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=helgrind --read-var-info=yes --error-exitcode=1 --read-var-info=yes
DRD_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=drd --free-is-write=yes --error-exitcode=1
SGCHECK_COMMAND= $(LIBTOOL_COMMAND) valgrind --tool=exp-sgcheck --error-exitcode=1
export GDB_COMMAND
valgrind:
- @echo make check TESTS_ENVIRONMENT="\"$(VALGRIND_EXEC_COMMAND)\""
+ @echo make check LOG_COMPILER="\"$(VALGRIND_EXEC_COMMAND)\""
sgcheck:
- @echo make check TESTS_ENVIRONMENT="\"$(SGCHECK_EXEC_COMMAND)\""
+ @echo make check LOG_COMPILER="\"$(SGCHECK_EXEC_COMMAND)\""
valgrind-supressions:
- @echo make check TESTS_ENVIRONMENT="\"$(VALGRIND_SUPRESSION)\""
+ @echo make check LOG_COMPILER="\"$(VALGRIND_SUPRESSION)\""
gdb:
- @echo make check TESTS_ENVIRONMENT="\"$(GDB_COMMAND)\""
+ @echo make check LOG_COMPILER="\"$(GDB_COMMAND)\""
helgrind:
- @echo make check TESTS_ENVIRONMENT="\"$(HELGRIND_COMMAND)\""
+ @echo make check LOG_COMPILER="\"$(HELGRIND_COMMAND)\""
drd:
- @echo make check TESTS_ENVIRONMENT="\"$(DRD_COMMAND)\""
+ @echo make check LOG_COMPILER="\"$(DRD_COMMAND)\""
EXTRA_DIST+= libtest/run.gdb
EXTRA_DIST+= libtest/version.h
server_startup_st *servers= (server_startup_st*)object;
test_true(servers);
- test_skip(false, bool(getenv("TESTS_ENVIRONMENT")));
+ test_skip(false, bool(getenv("LOG_COMPILER")));
if (MEMCACHED_SASL_BINARY)
{
static inline bool valgrind_is_caller(void)
{
- if (getenv("TESTS_ENVIRONMENT") && strstr(getenv("TESTS_ENVIRONMENT"), "valgrind"))
+ if (getenv("LOG_COMPILER") && strstr(getenv("LOG_COMPILER"), "valgrind"))
{
- if (strstr(getenv("TESTS_ENVIRONMENT"), "--tool") == NULL)
+ if (strstr(getenv("LOG_COMPILER"), "--tool") == NULL)
{
return true;
}
- if (strstr(getenv("TESTS_ENVIRONMENT"), "--tool=memcheck"))
+ if (strstr(getenv("LOG_COMPILER"), "--tool=memcheck"))
{
return true;
}
SKIP_UNLESS(libtest::has_libmemcached_sasl());
// Assume we are running under valgrind, and bail
- if (getenv("TESTS_ENVIRONMENT"))
+ if (getenv("LOG_COMPILER"))
{
error= TEST_SKIPPED;
return NULL;
static test_return_t init_udp_valgrind(memcached_st *memc)
{
- if (getenv("TESTS_ENVIRONMENT"))
+ if (getenv("LOG_COMPILER"))
{
return TEST_SKIPPED;
}
static test_return_t binary_init_udp(memcached_st *memc)
{
- if (getenv("TESTS_ENVIRONMENT"))
+ if (getenv("LOG_COMPILER"))
{
return TEST_SKIPPED;
}
static test_return_t udp_set_test(memcached_st *memc)
{
// Assume we are running under valgrind, and bail
- if (getenv("TESTS_ENVIRONMENT"))
+ if (getenv("LOG_COMPILER"))
{
return TEST_SUCCESS;
}