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

Unified Diff: ports/gtest/nacl.patch

Issue 1555913002: Build gtest from source rather than using SDK-provided version (Closed) Base URL: https://chromium.googlesource.com/webports.git@master
Patch Set: Created 4 years, 12 months 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: ports/gtest/nacl.patch
diff --git a/ports/gtest/nacl.patch b/ports/gtest/nacl.patch
index f94cf9fe959ed1d54af6d68666376ebd5ef518f6..1ddf555cdd856119261f19011676d21694a558ae 100644
--- a/ports/gtest/nacl.patch
+++ b/ports/gtest/nacl.patch
@@ -102,6 +102,19 @@ diff --git a/test/gtest-printers_test.cc b/test/gtest-printers_test.cc
// 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
@@ -126,16 +139,7 @@ diff --git a/test/gtest_test_utils.py b/test/gtest_test_utils.py
IS_CYGWIN = os.name == 'posix' and 'CYGWIN' in os.uname()[0]
# The environment variable for specifying the path to the premature-exit file.
-@@ -172,6 +173,8 @@ def GetTestExecutablePath(executable_name, build_dir=None):
- executable_name))
- if (IS_WINDOWS or IS_CYGWIN) and not path.endswith('.exe'):
- path += '.exe'
-+ if IS_NACL and not path.endswith('.sh'):
-+ path += '.sh'
-
- if not os.path.exists(path):
- message = (
-@@ -300,7 +303,8 @@ class Subprocess:
+@@ -300,7 +301,8 @@ class Subprocess:
else:
self.terminated_by_signal = False
self.exited = True
@@ -194,3 +198,33 @@ diff --git a/test/gtest_unittest.cc b/test/gtest_unittest.cc
// 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):
+diff --git a/test/gtest_xml_output_unittest.py b/test/gtest_xml_output_unittest.py
+--- a/test/gtest_xml_output_unittest.py
++++ b/test/gtest_xml_output_unittest.py
+@@ -193,6 +193,7 @@ class GTestXMLOutputUnitTest(gtest_xml_test_utils.GTestXMLTestCase):
+ minute=int(match.group(5)), second=int(match.group(6)))
+
+ time_delta = abs(datetime.datetime.now() - date_time_from_xml)
++ print date_time_from_xml
+ # timestamp value should be near the current local time
+ self.assertTrue(time_delta < datetime.timedelta(seconds=600),
+ 'time_delta is %s' % time_delta)

Powered by Google App Engine
This is Rietveld 408576698