projects
/
m6w6
/
libmemcached
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
|
github
raw
|
patch
|
inline
| side by side (parent:
93dec28
)
Valgrind returns a different error for invalid binary.
author
Brian Aker
<brian@tangent.org>
Mon, 5 Mar 2012 01:28:24 +0000
(17:28 -0800)
committer
Brian Aker
<brian@tangent.org>
Mon, 5 Mar 2012 01:28:24 +0000
(17:28 -0800)
libtest/unittest.cc
patch
|
blob
|
history
diff --git
a/libtest/unittest.cc
b/libtest/unittest.cc
index bffa4ecbf6544cd50b694bd13b14d3c234a99893..9945e38690451906f56776d4b522a1a62e86e019 100644
(file)
--- a/
libtest/unittest.cc
+++ b/
libtest/unittest.cc
@@
-363,7
+363,15
@@
static test_return_t application_doesnotexist_BINARY(void *)
const char *args[]= { "--fubar", 0 };
test_compare(Application::SUCCESS, true_app.run(args));
const char *args[]= { "--fubar", 0 };
test_compare(Application::SUCCESS, true_app.run(args));
- test_compare(Application::INVALID, true_app.wait());
+ // 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
+ {
+ test_compare(Application::INVALID, true_app.wait());
+ }
test_compare(0, true_app.stdout_result().size());
return TEST_SUCCESS;
test_compare(0, true_app.stdout_result().size());
return TEST_SUCCESS;