X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fcomparison.cc;h=c0c21937f9512b08dc127916cf14bb0ae1a89e5f;hb=f0b6a382ea0be4c327f9968cf5d65ac1dd8bdf4c;hp=0429cde87ff5c4d7bbe2dcd042158ad2ad095d7f;hpb=1f3d43109ef752862093f8e4340fcfec1832b3be;p=awesomized%2Flibmemcached diff --git a/libtest/comparison.cc b/libtest/comparison.cc index 0429cde8..c0c21937 100644 --- a/libtest/comparison.cc +++ b/libtest/comparison.cc @@ -34,7 +34,7 @@ * */ -#include +#include "libtest/yatlcon.h" #include namespace libtest { @@ -49,19 +49,14 @@ bool jenkins_is_caller(void) return false; } -bool valgrind_is_caller(void) +bool gdb_is_caller(void) { - if (bool(getenv("TESTS_ENVIRONMENT")) and strstr(getenv("TESTS_ENVIRONMENT"), "valgrind")) + if (bool(getenv("LOG_COMPILER")) and strstr(getenv("LOG_COMPILER"), "gdb")) { return true; } - return false; -} - -bool gdb_is_caller(void) -{ - if (bool(getenv("TESTS_ENVIRONMENT")) and strstr(getenv("TESTS_ENVIRONMENT"), "gdb")) + if (bool(getenv("LIBTEST_IN_GDB"))) { return true; } @@ -71,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; }