testing: fix osx
[awesomized/libmemcached] / test / main.cpp
1 #define CATCH_CONFIG_RUNNER
2 #include "lib/catch.hpp"
3 #include "mem_config.h"
4 #include <cstdlib>
5
6 #if HAVE_SETENV
7 # define SET_ENV(n, k, v) setenv(k, v, 0);
8 #else // !HAVE_SETENV
9 # define SET_ENV(n, k, v) static char n ## _env[] = k "=" v; putenv(n ## _env)
10 #endif
11
12 int main(int argc, char *argv[]) {
13
14 #if HAVE_ASAN
15 SET_ENV(asan, "ASAN_OPTIONS", "halt_on_error=0")
16 #endif
17
18 #if LIBMEMCACHED_WITH_SASL_SUPPORT
19 SET_ENV(sasl_pwdb, "MEMCACHED_SASL_PWDB", LIBMEMCACHED_WITH_SASL_PWDB);
20 SET_ENV(sasl_conf, "SASL_CONF_PATH", LIBMEMCACHED_WITH_SASL_CONF);
21 #endif
22
23 return Catch::Session().run(argc, argv);
24 }