X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fcomparison.cc;h=c0c21937f9512b08dc127916cf14bb0ae1a89e5f;hb=879ce2d055d3c4ebdbfa50e26877ee5948b04365;hp=b670326c65b35837a82c8a01b6491bf201a1af91;hpb=a1f2b0b98e03369ed051b232f1fc33ed1d611b16;p=awesomized%2Flibmemcached diff --git a/libtest/comparison.cc b/libtest/comparison.cc index b670326c..c0c21937 100644 --- a/libtest/comparison.cc +++ b/libtest/comparison.cc @@ -34,14 +34,14 @@ * */ -#include +#include "libtest/yatlcon.h" #include namespace libtest { -bool valgrind_is_caller(void) +bool jenkins_is_caller(void) { - if (bool(getenv("TESTS_ENVIRONMENT")) and strstr(getenv("TESTS_ENVIRONMENT"), "valgrind")) + if (bool(getenv("JENKINS_HOME"))) { return true; } @@ -51,7 +51,12 @@ bool valgrind_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; + } + + if (bool(getenv("LIBTEST_IN_GDB"))) { return true; } @@ -61,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; }