libtest: fix doesnotexist spawn test
[awesomized/libmemcached] / libtest / unittest.cc
index c21438890c31760d13ae9ed14fc0fa3c4ab6644b..fafe032a047a90e8b66b04f43b2adb40cf45c67d 100644 (file)
@@ -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)
   {
@@ -623,8 +623,12 @@ static test_return_t application_doesnotexist_BINARY(void *)
 #elif defined(__FreeBSD__) && __FreeBSD__
   ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.run(args));
 #else
-  ASSERT_EQ(Application::SUCCESS, true_app.run(args));
-  ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.join());
+  Application::error_t rc = true_app.run(args);
+  if (Application::SUCCESS == rc) {
+    ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.join());
+  } else {
+    ASSERT_EQ(Application::INVALID_POSIX_SPAWN, rc);
+  }
 #endif
 
   test_zero(true_app.stdout_result().size());