Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(998)

Unified Diff: mojo/edk/test/multiprocess_test_helper.h

Issue 728783003: Add infrastructure to run tests on android. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/edk/test/multiprocess_test_helper.h
diff --git a/mojo/edk/test/multiprocess_test_helper.h b/mojo/edk/test/multiprocess_test_helper.h
index d131460228aaf69494c9fa3ed23b67cd24a11392..61f43ab35c02f2d13346140025ba0d14e7486ed0 100644
--- a/mojo/edk/test/multiprocess_test_helper.h
+++ b/mojo/edk/test/multiprocess_test_helper.h
@@ -12,6 +12,7 @@
#include "base/test/multiprocess_test.h"
#include "base/test/test_timeouts.h"
#include "mojo/edk/embedder/scoped_platform_handle.h"
+#include "mojo/edk/embedder/test_embedder.h"
#include "testing/multiprocess_func_list.h"
namespace mojo {
@@ -75,9 +76,12 @@ class MultiprocessTestHelper {
// if you want to use |EXPECT_...()| or |ASSERT_...()|; it has a |void| return
// type. (Note that while an |ASSERT_...()| failure will abort the test in the
// child, it will not abort the test in the parent.)
+// On android, multiprocess cannot exec, so the embedder must be shut down.
#define MOJO_MULTIPROCESS_TEST_CHILD_TEST(test_child_name) \
void test_child_name##TestChildTest(); \
MOJO_MULTIPROCESS_TEST_CHILD_MAIN(test_child_name) { \
+ if (embedder::test::IsInitialized()) \
+ embedder::test::Shutdown(); \
test_child_name##TestChildTest(); \
return (::testing::Test::HasFatalFailure() || \
::testing::Test::HasNonfatalFailure()) \

Powered by Google App Engine
This is Rietveld 408576698