Open
Bug 1142396
Opened 9 years ago
Updated 2 years ago
Upgrade gtest and gmock both to 1.7.0
Categories
(Testing :: GTest, defect)
Testing
GTest
Tracking
(Not tracked)
NEW
People
(Reporter: TYLin, Unassigned)
Details
Attachments
(1 obsolete file)
When working on bug 1110039, we add a gtest which hit a compile warning in gmock library. This warning seemed fixed by r405 [1] which was included in gmock 1.7.0. I'd like to upgrade gtest and gmock both to 1.7.0 to eliminate this waring so that we could use "FAIL_ON_WARNINGS = True" in the gtest file. [1] https://code.google.com/p/googlemock/source/detail?r=405 The complete log for the warning. 0:07.56 In file included from /Users/tlin/Projects/gecko-dev/layout/base/gtest/TestCopyPasteEventHub.cpp:8: 0:07.56 In file included from ../../../dist/include/gmock/gmock.h:58: 0:07.56 In file included from ../../../dist/include/gmock/gmock-actions.h:46: 0:07.56 Warning: -Wnull-dereference in /Users/tlin/Projects/gecko-dev/obj-firefox/dist/include/gmock/internal/gmock-internal-utils.h: indirection of non-volatile null pointer will be deleted, not trap 0:07.56 ../../../dist/include/gmock/internal/gmock-internal-utils.h:355:10: warning: indirection of non-volatile null pointer will be deleted, not trap [-Wnull-dereference] 0:07.56 return *static_cast<typename remove_reference<T>::type*>(NULL); 0:07.56 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 0:07.56 ../../../dist/include/gmock/gmock-actions.h:78:22: note: in instantiation of function template specialization 'testing::internal::Invalid<nsresult>' requested here 0:07.56 return internal::Invalid<T>(); 0:07.56 ^ 0:07.57 ../../../dist/include/gmock/gmock-actions.h:190:43: note: in instantiation of member function 'testing::internal::BuiltInDefaultValue<nsresult>::Get' requested here 0:07.57 internal::BuiltInDefaultValue<T>::Get() : *value_; 0:07.57 ^ 0:07.57 ../../../dist/include/gmock/gmock-spec-builders.h:1435:34: note: in instantiation of member function 'testing::DefaultValue<nsresult>::Get' requested here 0:07.57 return DefaultValue<Result>::Get(); 0:07.57 ^ 0:07.57 ../../../dist/include/gmock/gmock-spec-builders.h:1334:22: note: in instantiation of member function 'testing::internal::FunctionMockerBase<nsresult (const nsPoint &)>::PerformDefaultAction' requested here 0:07.57 func_mocker->PerformDefaultAction(args, call_description)); 0:07.57 ^ 0:07.57 ../../../dist/include/gmock/gmock-spec-builders.h:1448:26: note: in instantiation of function template specialization 'testing::internal::ActionResultHolder<nsresult>::PerformDefaultAction<nsresult (const nsPoint &)>' requested here 0:07.57 return ResultHolder::PerformDefaultAction(this, args, call_description); 0:07.57 ^ 0:07.57 ../../../dist/include/gmock/gmock-generated-function-mockers.h:81:7: note: in instantiation of member function 'testing::internal::FunctionMockerBase<nsresult (const nsPoint &)>::UntypedPerformDefaultAction' requested here 0:07.57 class FunctionMocker<R(A1)> : public 0:07.57 ^ 0:07.57 ../../../dist/include/gmock/internal/gmock-internal-utils.h:355:10: note: consider using __builtin_trap() or qualifying pointer with 'volatile' 0:07.57 return *static_cast<typename remove_reference<T>::type*>(NULL);
Reporter | ||
Comment 1•9 years ago
|
||
/r/5235 - Bug 1142396 Part 1 - Upgrade gtest to 1.7.0. r=ted /r/5237 - Bug 1142396 Part 2 - Upgrade gmock to 1.7.0. r=ted /r/5239 - Bug 1142396 Part 3 - Fix <initializer_list> header cannot be found. r=ted Pull down these commits: hg pull review -r 89ef06cf856ad313a07804cbfb5017d8777a2cc3
Attachment #8576481 -
Flags: review?(ted)
Reporter | ||
Comment 2•9 years ago
|
||
https://reviewboard.mozilla.org/r/5235/#review4245
Reporter | ||
Comment 3•9 years ago
|
||
Comment on attachment 8576481 [details] MozReview Request: bz://1142396/TYLin /r/5235 - Bug 1142396 Part 1 - Upgrade gtest to 1.7.0. r=ted /r/5237 - Bug 1142396 Part 2 - Upgrade gmock to 1.7.0. r=ted /r/5239 - Bug 1142396 Part 3 - Fix <initializer_list> header cannot be found. r=ted Pull down these commits: hg pull review -r 89ef06cf856ad313a07804cbfb5017d8777a2cc3
Reporter | ||
Comment 4•9 years ago
|
||
https://reviewboard.mozilla.org/r/5235/#review4247 This patch is needed. I don't know why it is discarded. Is there a way to resurrect it?
Reporter | ||
Comment 5•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=d6c29f3d91fe
Reporter | ||
Comment 6•9 years ago
|
||
Comment on attachment 8576481 [details]
MozReview Request: bz://1142396/TYLin
Cancel review due to build error on Android.
Attachment #8576481 -
Flags: review?(ted)
Reporter | ||
Updated•9 years ago
|
Attachment #8576481 -
Attachment is obsolete: true
Reporter | ||
Comment 7•9 years ago
|
||
Since our current gtest and gmock were patched by ourselves, it takes some effort to port those patches to 1.7.0. I will discontinue working on this bug.
Assignee: tlin → nobody
Comment 8•9 years ago
|
||
Yuck. What patches are we carrying locally? We should try to upstream them.
Reporter | ||
Comment 9•9 years ago
|
||
Here is the history of the gtest folder. $ git log --abbrev-commit --pretty=oneline testing/gtest/gtest/ df9d265 Bug 1019382 - use GTEST_ATTRIBUTE_UNUSED_ to avoid gcc 4.8 compiler warning. r=ted a3d90fe Bug 1018270 - Part 1: Cherrypick -Wunused-private-field warning fix from upstream gtest. r=ted 579fb90 Bug 885624 - Cherry-pick gtest@{r621,r629} to unbreak --enable-tests with libc++. r=bgirard 9d6819b Bug 861637 - Add workaround for missing clone function. r=blassey 3655509 Bug 844630 - Be explicit about environ visibility. r=bgirard f49834c Bug 767231 - Part 1: Add GTest. r=ted
Updated•6 years ago
|
Component: General → GTest
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•