prepare v1.1.4
[awesomized/libmemcached] / test / main.cpp
index 2908745b909ead26a9fda56ed1c2ed3d0afa3acc..4bac6d7190972cbe005a1d7ab1a507e36a1e6c98 100644 (file)
@@ -1,24 +1,23 @@
+/*
+    +--------------------------------------------------------------------+
+    | libmemcached - C/C++ Client Library for memcached                  |
+    +--------------------------------------------------------------------+
+    | Redistribution and use in source and binary forms, with or without |
+    | modification, are permitted under the terms of the BSD license.    |
+    | You should have received a copy of the license in a bundled file   |
+    | named LICENSE; in case you did not receive a copy you can review   |
+    | the terms online at: https://opensource.org/licenses/BSD-3-Clause  |
+    +--------------------------------------------------------------------+
+    | Copyright (c) 2006-2014 Brian Aker   https://datadifferential.com/ |
+    | Copyright (c) 2020 Michael Wallner   <mike@php.net>                |
+    +--------------------------------------------------------------------+
+*/
+
 #define CATCH_CONFIG_RUNNER
 #include "lib/catch.hpp"
-#include "mem_config.h"
-#include <cstdlib>
-
-#if HAVE_SETENV
-# define SET_ENV(n, k, v) setenv(k, v, 0);
-#else // !HAVE_SETENV
-# define SET_ENV(n, k, v) static char n ## _env[] = k "=" v; putenv(n ## _env)
-#endif
+#include "setup.hpp"
 
 int main(int argc, char *argv[]) {
-
-#if HAVE_ASAN
-  SET_ENV(asan, "ASAN_OPTIONS", "halt_on_error=0")
-#endif
-
-#if LIBMEMCACHED_WITH_SASL_SUPPORT
-  SET_ENV(sasl_pwdb, "MEMCACHED_SASL_PWDB", LIBMEMCACHED_WITH_SASL_PWDB);
-  SET_ENV(sasl_conf, "SASL_CONF_PATH", LIBMEMCACHED_WITH_SASL_CONF);
-#endif
-
+  setup(argc, &argv);
   return Catch::Session().run(argc, argv);
 }