Application true_app("doesnotexist");
const char *args[]= { "--fubar", 0 };
+#if defined(TARGET_OS_OSX) && TARGET_OS_OSX
+ test_compare(Application::INVALID, true_app.run(args));
+#else
test_compare(Application::SUCCESS, true_app.run(args));
- test_compare(Application::INVALID, true_app.wait());
+#endif
+ // Behavior is different if we are running under valgrind
+ if (getenv("TESTS_ENVIRONMENT") and strstr(getenv("TESTS_ENVIRONMENT"), "valgrind"))
+ {
+ test_compare(Application::FAILURE, true_app.wait());
+ }
+ else
+ {
+#if defined(TARGET_OS_OSX) && TARGET_OS_OSX
+ test_compare(Application::FAILURE, true_app.wait());
+#else
+ test_compare(Application::INVALID, true_app.wait());
+#endif
+ }
test_compare(0, true_app.stdout_result().size());
return TEST_SUCCESS;
static test_return_t gdb_wait_services_appliction_TEST(void *)
{
+#if defined(TARGET_OS_OSX) && TARGET_OS_OSX
+ test_skip(0, TARGET_OS_OSX);
+#endif
+
test_skip(0, access("/etc/services", R_OK ));
libtest::Application wait_app("libtest/wait", true);
static test_return_t gdb_abort_services_appliction_TEST(void *)
{
+#if defined(TARGET_OS_OSX) && TARGET_OS_OSX
+ test_skip(0, TARGET_OS_OSX);
+#endif
+
libtest::Application abort_app("libtest/abort", true);
abort_app.use_gdb();