Make gTests run in automation
Categories
(Thunderbird :: Build Config, defect)
Tracking
(Not tracked)
People
(Reporter: jorgk-bmo, Assigned: rjl)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 4 obsolete files)
47 bytes,
text/x-phabricator-request
|
Details | Review | |
7.42 KB,
patch
|
Details | Diff | Splinter Review | |
878 bytes,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
Now that M-C is top source directory, we can run gTests. We have two gTests: TestMsgStripRE and TestMailCookie.
The former will land in bug 1466748 and the latter needs to be repaired in bug 1543219 before it will pass.
To run them:
mach gtest TestMailCookie*
mach gtest TestMsgStripRE*
It would be nice to write a whole lot more gTests, so they should become part of the testing suite.
Reporter | ||
Updated•5 years ago
|
Reporter | ||
Comment 1•5 years ago
|
||
I found another ancient C++ test which could be converted to a gTest:
https://searchfox.org/comm-central/search?q=TestImapFlagAndUidState&case=false®exp=false&path=
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 2•5 years ago
|
||
Work in progress.
Assignee | ||
Comment 3•5 years ago
|
||
Work in progress.
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 4•5 years ago
•
|
||
Nice to see. Note that TestMailCookie will currently fail, bug 1579698, after we spent so much energy on making it work in bug 1543219 :-(
Assignee | ||
Comment 5•5 years ago
|
||
To narrow down the tests that get run for Thunderbird, we can set the "GTEST_FILTER" environment variable, which is what "mach gtest" does. That would require that we stick to a standard prefix or a few prefixes that can be matched with simple wildcards.
Just now I tried "TestMsg*:TestMail*" and it ran the two tests that are set up.
Would that work? There might be some other ways to do it with some C programming.
Reporter | ||
Comment 6•5 years ago
|
||
I'm cool with "TestMsg*:TestMail*". That looks "mail-related".
Assignee | ||
Comment 7•5 years ago
|
||
Pushed by thunderbird@calypsoblue.org: https://hg.mozilla.org/integration/autoland/rev/6e1fbe59c0a3 Enable building gtest xul for Thunderbird. r=nalexander
Comment 9•5 years ago
|
||
bugherder |
Reporter | ||
Comment 10•5 years ago
|
||
Hmm, I guess only the M-C part landed here. And I hope we're not busted without the C-C part.
Reporter | ||
Updated•5 years ago
|
Assignee | ||
Comment 11•5 years ago
|
||
Thc M-C change just creates the target.gtest.tests.tar.gz artifact during the build so it can be used later for the test.
Unfortunately, setting the environment variables didn't work when I ran my try job late last night. Mozharness saw it just fine and the logs show that GTEST_FILTER is set throughout the setup to run the tests, but then rungtests.py either drops or ignores it, so every test ran. I'll try something else.
Assignee | ||
Comment 12•5 years ago
|
||
This will get things going. The M-C portion already landed. I did some sorting as well.
Assignee | ||
Updated•5 years ago
|
Comment 13•5 years ago
|
||
Comment on attachment 9092247 [details] [diff] [review] thunderbird_gtests.patch Review of attachment 9092247 [details] [diff] [review]: ----------------------------------------------------------------- Okay, but I have some (rhetorical) questions. ::: mozharness/unittests/thunderbird_extra.py @@ +17,5 @@ > ], > + "all_gtest_suites": { > + "gtest": { > + 'env': { > + 'GTEST_FILTER': 'TestMail*:TestMsg*' Switching quote style? ::: taskcluster/ci/test/compiled.yml @@ +25,5 @@ > + treeherder-symbol: GTest > + instance-size: xlarge > + run-on-projects: > + by-test-platform: > + windows.*-shippable/.*: [] # possible permafail? What about non-shippable? Does that not also fail? ::: taskcluster/ci/test/test-platforms.yml @@ +24,3 @@ > - mozmill-tests > - xpcshell-tests > + - marionette-tests Why does marionette move for each of these? Are you sorting the lists? Because if so they're still very unsorted.
Assignee | ||
Comment 14•5 years ago
|
||
No major changes here, just addressing comments. I had not run the windows-shippable tests yet, that comment relates only to Firefox it seems, I suspect because they use PGO on shippable builds and as of now Thunderbird does not. However, TestMsgStripRE is failing on OSX. It appears to be a legitimate fail, not something related to automation. All tests that are not DISABLED will run with this revision. I can make a followup to disable macOS if the sheriffs like.
Assignee | ||
Updated•5 years ago
|
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 15•5 years ago
|
||
Yes, let's disable whatever is failing. No idea why TestMsgStripRE is failing on Mac. Some more interference from the Mac address book like we had for Marionette? We also need to disable the MailCookie test, see bug 1579698.
Assignee | ||
Comment 16•5 years ago
|
||
Disable macOS. There's a patch on bug 1579698 to disalble MailCookie tests.
Assignee | ||
Updated•5 years ago
|
Reporter | ||
Comment 17•5 years ago
|
||
Geoff, if you land this, please also land bug 1579698. Adding NI so the comment doesn't get overlooked.
Comment 18•5 years ago
|
||
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/fe313409a472
Add gtest tests to Taskcluster. r=darktrojan
Reporter | ||
Comment 19•5 years ago
|
||
Tests were supposed to be switched off on Mac, but they ran and failed :-(
Comment 20•5 years ago
|
||
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/b3245af18949 Follow-up: fix indentation/yaml error. rs=white-space-only
Assignee | ||
Comment 21•5 years ago
|
||
(In reply to Jorg K (GMT+2) (reduced availability 14-19 of Sept.) from comment #19)
Tests were supposed to be switched off on Mac, but they ran and failed :-(
I will do a followup this afternoon.
Assignee | ||
Comment 22•5 years ago
|
||
Regular Expressions != Globs
Reporter | ||
Comment 23•5 years ago
|
||
Comment on attachment 9093412 [details] [diff] [review] thunderbird_gtests_part2.patch I've seen a regexp before in my life.
Comment 24•5 years ago
|
||
Pushed by mozilla@jorgk.com: https://hg.mozilla.org/comm-central/rev/c19cbff54c47 Follow-up: Disable gTests on macOS, fix regular expression. r=jorgk
Description
•