blob: 7f223e60284d0ccec81cdf9983d4b68add9abb8b [file] [log] [blame]
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -172,14 +172,16 @@ if (gtest_build_tests)
cxx_test_with_flags(gtest_no_rtti_unittest "${cxx_no_rtti}"
gtest_main_no_rtti test/gtest_unittest.cc)
- cxx_shared_library(gtest_dll "${cxx_default}"
- src/gtest-all.cc src/gtest_main.cc)
+ if (NOT NACL)
+ cxx_shared_library(gtest_dll "${cxx_default}"
+ src/gtest-all.cc src/gtest_main.cc)
- cxx_executable_with_flags(gtest_dll_test_ "${cxx_default}"
- gtest_dll test/gtest_all_test.cc)
- set_target_properties(gtest_dll_test_
- PROPERTIES
- COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
+ cxx_executable_with_flags(gtest_dll_test_ "${cxx_default}"
+ gtest_dll test/gtest_all_test.cc)
+ set_target_properties(gtest_dll_test_
+ PROPERTIES
+ COMPILE_DEFINITIONS "GTEST_LINKED_AS_SHARED_LIBRARY=1")
+ endif()
if (NOT MSVC OR MSVC_VERSION LESS 1600) # 1600 is Visual Studio 2010.
# Visual Studio 2010, 2012, and 2013 define symbols in std::tr1 that
diff --git a/test/gtest-death-test_test.cc b/test/gtest-death-test_test.cc
--- a/test/gtest-death-test_test.cc
+++ b/test/gtest-death-test_test.cc
@@ -1303,6 +1303,7 @@ TEST(ConditionalDeathMacrosDeathTest, ExpectsDeathWhenDeathTestsAvailable) {
EXPECT_FATAL_FAILURE(ASSERT_DEATH_IF_SUPPORTED(;, ""), "");
}
+#if 0
TEST(InDeathTestChildDeathTest, ReportsDeathTestCorrectlyInFastStyle) {
testing::GTEST_FLAG(death_test_style) = "fast";
EXPECT_FALSE(InDeathTestChild());
@@ -1322,6 +1323,7 @@ TEST(InDeathTestChildDeathTest, ReportsDeathTestCorrectlyInThreadSafeStyle) {
_exit(1);
}, "Inside");
}
+#endif
#else // !GTEST_HAS_DEATH_TEST follows
diff --git a/test/gtest-options_test.cc b/test/gtest-options_test.cc
--- a/test/gtest-options_test.cc
+++ b/test/gtest-options_test.cc
@@ -116,6 +116,7 @@ TEST(OutputFileHelpersTest, GetCurrentExecutableName) {
// Chandler Carruth's libtool replacement is ready.
const bool success =
exe_str == "gtest-options_test" ||
+ exe_str == "gtest-options_test.nexe" ||
exe_str == "gtest_all_test" ||
exe_str == "lt-gtest_all_test" ||
exe_str == "gtest_dll_test";
diff --git a/test/gtest-printers_test.cc b/test/gtest-printers_test.cc
--- a/test/gtest-printers_test.cc
+++ b/test/gtest-printers_test.cc
@@ -959,6 +959,7 @@ TEST(PrintStlContainerTest, NestedContainer) {
EXPECT_EQ("{ { 1, 2 }, { 3, 4, 5 } }", Print(v));
}
+#if 0
TEST(PrintStlContainerTest, OneDimensionalNativeArray) {
const int a[3] = { 1, 2, 3 };
NativeArray<int> b(a, 3, RelationToSourceReference());
@@ -970,6 +971,7 @@ TEST(PrintStlContainerTest, TwoDimensionalNativeArray) {
NativeArray<int[3]> b(a, 2, RelationToSourceReference());
EXPECT_EQ("{ { 1, 2, 3 }, { 4, 5, 6 } }", Print(b));
}
+#endif
// Tests that a class named iterator isn't treated as a container.
diff --git a/test/gtest_break_on_failure_unittest.py b/test/gtest_break_on_failure_unittest.py
--- a/test/gtest_break_on_failure_unittest.py
+++ b/test/gtest_break_on_failure_unittest.py
@@ -136,6 +136,9 @@ class GTestBreakOnFailureUnitTest(gtest_test_utils.TestCase):
SetEnvVar(BREAK_ON_FAILURE_ENV_VAR, None)
+ if gtest_test_utils.IS_NACL:
+ return
+
msg = ('when %s%s, an assertion failure in "%s" %s cause a seg-fault.' %
(BREAK_ON_FAILURE_ENV_VAR, env_var_value_msg, ' '.join(command),
should_or_not))
diff --git a/test/gtest_help_test.py b/test/gtest_help_test.py
--- a/test/gtest_help_test.py
+++ b/test/gtest_help_test.py
@@ -44,7 +44,8 @@ import re
import gtest_test_utils
-IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
+IS_NACL = True
+IS_LINUX = not IS_NACL and (os.name == 'posix' and os.uname()[0] == 'Linux')
IS_WINDOWS = os.name == 'nt'
PROGRAM_PATH = gtest_test_utils.GetTestExecutablePath('gtest_help_test_')
diff --git a/test/gtest_test_utils.py b/test/gtest_test_utils.py
--- a/test/gtest_test_utils.py
+++ b/test/gtest_test_utils.py
@@ -54,6 +54,7 @@ except:
GTEST_OUTPUT_VAR_NAME = 'GTEST_OUTPUT'
IS_WINDOWS = os.name == 'nt'
+IS_NACL = True
IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0]
# The environment variable for specifying the path to the premature-exit file.
@@ -300,7 +301,8 @@ class Subprocess:
else:
self.terminated_by_signal = False
self.exited = True
- self.exit_code = self._return_code
+
+ self.exit_code = self._return_code
def Main():
diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc
--- a/test/gtest_unittest.cc
+++ b/test/gtest_unittest.cc
@@ -7608,6 +7608,7 @@ TEST(CopyArrayTest, WorksForTwoDimensionalArrays) {
// Tests NativeArray.
+#if 0
TEST(NativeArrayTest, ConstructorFromArrayWorks) {
const int a[3] = { 0, 1, 2 };
NativeArray<int> na(a, 3, RelationToSourceReference());
@@ -7629,6 +7630,7 @@ TEST(NativeArrayTest, CreatesAndDeletesCopyOfArrayWhenAskedTo) {
// We rely on the heap checker to verify that na deletes the copy of
// array.
}
+#endif
TEST(NativeArrayTest, TypeMembersAreCorrect) {
StaticAssertTypeEq<char, NativeArray<char>::value_type>();
@@ -7638,6 +7640,7 @@ TEST(NativeArrayTest, TypeMembersAreCorrect) {
StaticAssertTypeEq<const bool(*)[2], NativeArray<bool[2]>::const_iterator>();
}
+#if 0
TEST(NativeArrayTest, MethodsWork) {
const int a[3] = { 0, 1, 2 };
NativeArray<int> na(a, 3, RelationToSourceCopy());
@@ -7670,6 +7673,7 @@ TEST(NativeArrayTest, WorksForTwoDimensionalArray) {
ASSERT_EQ(2U, na.size());
EXPECT_EQ(a, na.begin());
}
+#endif
// Tests SkipPrefix().
diff --git a/test/gtest_xml_outfiles_test.py b/test/gtest_xml_outfiles_test.py
--- a/test/gtest_xml_outfiles_test.py
+++ b/test/gtest_xml_outfiles_test.py
@@ -108,12 +108,13 @@ class GTestXMLOutFilesTest(gtest_xml_test_utils.GTestXMLTestCase):
# gtest_xml_outfiles_test_. To account for this possibillity, we
# allow both names in the following code. We should remove this
# hack when Chandler Carruth's libtool replacement tool is ready.
- output_file_name1 = test_name + ".xml"
+ output_file_name1 = test_name + ".nexe.xml"
output_file1 = os.path.join(self.output_dir_, output_file_name1)
output_file_name2 = 'lt-' + output_file_name1
output_file2 = os.path.join(self.output_dir_, output_file_name2)
self.assert_(os.path.isfile(output_file1) or os.path.isfile(output_file2),
- output_file1)
+ "Nither output file exists (%s %s)" % (output_file1,
+ output_file2))
expected = minidom.parseString(expected_xml)
if os.path.isfile(output_file1):