From: Brian Aker Date: Sun, 19 Jan 2014 12:59:53 +0000 (-0800) Subject: Make the switch to the more modern LOG_COMPILER env. X-Git-Tag: 1.0.18~13^2 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=813bad3ab65eec288b4ce1588e32947891366e55;p=awesomized%2Flibmemcached Make the switch to the more modern LOG_COMPILER env. --- diff --git a/bootstrap.sh b/bootstrap.sh index a95cb854..06f6fbe0 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -38,7 +38,7 @@ # LIBTOOLIZE # MAKE # PREFIX -# TESTS_ENVIRONMENT +# LOG_COMPILER # VERBOSE # WARNINGS # @@ -490,8 +490,8 @@ save_BUILD () 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 @@ -506,8 +506,8 @@ save_BUILD () 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 } @@ -529,15 +529,15 @@ restore_BUILD () 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 } @@ -571,9 +571,9 @@ make_valgrind () # 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' @@ -707,11 +707,11 @@ make_skeleton () 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 @@ -939,9 +939,9 @@ make_gdb () # 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' @@ -978,9 +978,9 @@ make_target () 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 @@ -1398,8 +1398,8 @@ print_setup () 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 @@ -1539,8 +1539,8 @@ execute_job () 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 @@ -1692,7 +1692,7 @@ main () 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 @@ -1886,7 +1886,7 @@ bootstrap () export LIBTOOLIZE_OPTIONS export MAKE export PREFIX_ARG - export TESTS_ENVIRONMENT + export LOG_COMPILER export VERBOSE export WARNINGS diff --git a/libtest/comparison.cc b/libtest/comparison.cc index 9b3e45e5..c0c21937 100644 --- a/libtest/comparison.cc +++ b/libtest/comparison.cc @@ -51,7 +51,7 @@ bool jenkins_is_caller(void) 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; } @@ -66,7 +66,7 @@ bool gdb_is_caller(void) 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; } diff --git a/libtest/include.am b/libtest/include.am index 27682be2..0e5efc7a 100644 --- a/libtest/include.am +++ b/libtest/include.am @@ -7,7 +7,7 @@ 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 @@ -25,22 +25,22 @@ export SGCHECK_COMMAND 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 diff --git a/libtest/unittest.cc b/libtest/unittest.cc index c2143889..a2843d27 100644 --- a/libtest/unittest.cc +++ b/libtest/unittest.cc @@ -540,7 +540,7 @@ static test_return_t memcached_sasl_test(void *object) 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) { diff --git a/libtest/valgrind.h b/libtest/valgrind.h index 9d9e8bac..effeddc1 100644 --- a/libtest/valgrind.h +++ b/libtest/valgrind.h @@ -38,14 +38,14 @@ 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; } diff --git a/tests/libmemcached_world.h b/tests/libmemcached_world.h index 4d4953ee..2608778c 100644 --- a/tests/libmemcached_world.h +++ b/tests/libmemcached_world.h @@ -50,7 +50,7 @@ static void *world_create(libtest::server_startup_st& servers, test_return_t& er 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; diff --git a/tests/mem_udp.cc b/tests/mem_udp.cc index 2267fac0..53584146 100644 --- a/tests/mem_udp.cc +++ b/tests/mem_udp.cc @@ -145,7 +145,7 @@ static test_return_t init_udp(memcached_st *memc) static test_return_t init_udp_valgrind(memcached_st *memc) { - if (getenv("TESTS_ENVIRONMENT")) + if (getenv("LOG_COMPILER")) { return TEST_SKIPPED; } @@ -157,7 +157,7 @@ static test_return_t init_udp_valgrind(memcached_st *memc) static test_return_t binary_init_udp(memcached_st *memc) { - if (getenv("TESTS_ENVIRONMENT")) + if (getenv("LOG_COMPILER")) { return TEST_SKIPPED; } @@ -269,7 +269,7 @@ static test_return_t set_udp_behavior_test(memcached_st *memc) 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; }