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

Issue 10690161: Make it possible to run gtests on iOS. (Closed)

Created:
8 years, 5 months ago by leng
Modified:
8 years, 5 months ago
CC:
chromium-reviews, erikwright (departed), brettw-cc_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@presubmit_change
Visibility:
Public.

Description

Make it possible to run gtests on iOS. Adds MainHook object to run_all_unittests main() and run_all_perftest main(), so tests run without beng killed by the OS. (If an application does not check in within a certain amount of time after launch, it will be killed.) The object is empty for non-iOS. Adds test_listener_ios to test_suite, which registers to be notified on test end. At test end, it runs the run loop to prevent the test run from being killed by the OS. Disables two tests for iOS: BooleanOperators and StringPattern. BUG=b/6753976 TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=146542

Patch Set 1 #

Total comments: 25

Patch Set 2 : Code review feedback addressed. #

Total comments: 14

Patch Set 3 : More feedback applied. #

Patch Set 4 : Empty line added. #

Total comments: 16

Patch Set 5 : More feedback - no leak, better comments, and more. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+214 lines, -4 lines) Patch
M base/base.gyp View 1 2 chunks +5 lines, -0 lines 0 comments Download
A base/test/main_hook.h View 1 2 3 1 chunk +17 lines, -0 lines 0 comments Download
A base/test/main_hook.cc View 1 2 1 chunk +9 lines, -0 lines 0 comments Download
A base/test/main_hook_ios.mm View 1 2 3 4 1 chunk +108 lines, -0 lines 0 comments Download
M base/test/run_all_perftests.cc View 1 chunk +3 lines, -1 line 0 comments Download
M base/test/run_all_unittests.cc View 1 chunk +3 lines, -1 line 0 comments Download
A base/test/test_listener_ios.h View 1 1 chunk +17 lines, -0 lines 0 comments Download
A base/test/test_listener_ios.mm View 1 2 1 chunk +45 lines, -0 lines 0 comments Download
M base/test/test_suite.cc View 1 2 2 chunks +7 lines, -2 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
leng
This requires changes to the PRESUBMIT.py script to be submitted. Those changes are in a ...
8 years, 5 months ago (2012-07-12 09:03:43 UTC) #1
stuartmorgan
https://chromiumcodereview.appspot.com/10690161/diff/1/base/test/main_hook.h File base/test/main_hook.h (right): https://chromiumcodereview.appspot.com/10690161/diff/1/base/test/main_hook.h#newcode8 base/test/main_hook.h:8: class MainHook { Needs a class level comment (just ...
8 years, 5 months ago (2012-07-12 09:36:31 UTC) #2
leng
Thanks, PTAL https://chromiumcodereview.appspot.com/10690161/diff/1/base/test/main_hook.h File base/test/main_hook.h (right): https://chromiumcodereview.appspot.com/10690161/diff/1/base/test/main_hook.h#newcode8 base/test/main_hook.h:8: class MainHook { On 2012/07/12 09:36:31, stuartmorgan ...
8 years, 5 months ago (2012-07-12 10:44:42 UTC) #3
stuartmorgan
LGTM with nits. https://chromiumcodereview.appspot.com/10690161/diff/7002/base/test/main_hook.cc File base/test/main_hook.cc (right): https://chromiumcodereview.appspot.com/10690161/diff/7002/base/test/main_hook.cc#newcode9 base/test/main_hook.cc:9: } Maybe move this up to ...
8 years, 5 months ago (2012-07-12 10:59:23 UTC) #4
leng
https://chromiumcodereview.appspot.com/10690161/diff/7002/base/test/main_hook.cc File base/test/main_hook.cc (right): https://chromiumcodereview.appspot.com/10690161/diff/7002/base/test/main_hook.cc#newcode9 base/test/main_hook.cc:9: } On 2012/07/12 10:59:23, stuartmorgan wrote: > Maybe move ...
8 years, 5 months ago (2012-07-12 11:17:31 UTC) #5
Mark Mentovai
https://chromiumcodereview.appspot.com/10690161/diff/4006/base/test/main_hook_ios.mm File base/test/main_hook_ios.mm (right): https://chromiumcodereview.appspot.com/10690161/diff/4006/base/test/main_hook_ios.mm#newcode16 base/test/main_hook_ios.mm:16: // MainHook saves the chrome main() and calls UIApplicationMain(), ...
8 years, 5 months ago (2012-07-12 13:37:50 UTC) #6
stuartmorgan
https://chromiumcodereview.appspot.com/10690161/diff/4006/base/test/main_hook_ios.mm File base/test/main_hook_ios.mm (right): https://chromiumcodereview.appspot.com/10690161/diff/4006/base/test/main_hook_ios.mm#newcode63 base/test/main_hook_ios.mm:63: [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:2.0]]; On 2012/07/12 13:37:50, Mark Mentovai wrote: ...
8 years, 5 months ago (2012-07-12 13:41:35 UTC) #7
Mark Mentovai
https://chromiumcodereview.appspot.com/10690161/diff/4006/base/test/main_hook_ios.mm File base/test/main_hook_ios.mm (right): https://chromiumcodereview.appspot.com/10690161/diff/4006/base/test/main_hook_ios.mm#newcode63 base/test/main_hook_ios.mm:63: [NSThread sleepUntilDate:[NSDate dateWithTimeIntervalSinceNow:2.0]]; stuartmorgan wrote: > On 2012/07/12 13:37:50, ...
8 years, 5 months ago (2012-07-12 14:04:09 UTC) #8
stuartmorgan
On 2012/07/12 14:04:09, Mark Mentovai wrote: > The TODO says “figure out how much time ...
8 years, 5 months ago (2012-07-12 14:31:57 UTC) #9
leng
Thanks, PTAL https://chromiumcodereview.appspot.com/10690161/diff/4006/base/test/main_hook_ios.mm File base/test/main_hook_ios.mm (right): https://chromiumcodereview.appspot.com/10690161/diff/4006/base/test/main_hook_ios.mm#newcode16 base/test/main_hook_ios.mm:16: // MainHook saves the chrome main() and ...
8 years, 5 months ago (2012-07-12 15:18:06 UTC) #10
Mark Mentovai
LGTM
8 years, 5 months ago (2012-07-12 15:47:41 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/leng@chromium.org/10690161/12003
8 years, 5 months ago (2012-07-13 08:01:55 UTC) #12
commit-bot: I haz the power
8 years, 5 months ago (2012-07-13 09:21:36 UTC) #13
Change committed as 146542

Powered by Google App Engine
This is Rietveld 408576698