Index: native_client_sdk/src/tests/nacl_io_test/main.cc |
diff --git a/native_client_sdk/src/tests/nacl_io_test/main.cc b/native_client_sdk/src/tests/nacl_io_test/main.cc |
index 326c18f12c443f48cc76e56cb17f0d4029351b1d..31414e64c5e86d77ff324bd8cc8dcc00dd862005 100644 |
--- a/native_client_sdk/src/tests/nacl_io_test/main.cc |
+++ b/native_client_sdk/src/tests/nacl_io_test/main.cc |
@@ -5,17 +5,6 @@ |
#include <string> |
#include "gtest/gtest.h" |
- |
-#if defined(SEL_LDR) |
- |
-int main(int argc, char* argv[]) { |
- setenv("TERM", "xterm-256color", 0); |
- ::testing::InitGoogleTest(&argc, argv); |
- return RUN_ALL_TESTS(); |
-} |
- |
-#else |
- |
#include "ppapi/cpp/instance.h" |
#include "ppapi/cpp/var.h" |
#include "ppapi_simple/ps_main.h" |
@@ -54,14 +43,15 @@ class GTestEventListener : public ::testing::EmptyTestEventListener { |
}; |
int example_main(int argc, char* argv[]) { |
+ setenv("TERM", "xterm-256color", 0); |
::testing::InitGoogleTest(&argc, argv); |
- ::testing::UnitTest::GetInstance()->listeners() |
- .Append(new GTestEventListener()); |
+ if (PSGetInstanceId() != 0) { |
+ ::testing::UnitTest::GetInstance()->listeners() |
+ .Append(new GTestEventListener()); |
+ } |
return RUN_ALL_TESTS(); |
} |
// Register the function to call once the Instance Object is initialized. |
// see: pappi_simple/ps_main.h |
PPAPI_SIMPLE_REGISTER_MAIN(example_main); |
- |
-#endif |