Closed
Bug 932562
Opened 11 years ago
Closed 7 years ago
Allow running gtests with a b2g build
Categories
(Testing :: General, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: botond, Assigned: slee)
References
(Blocks 1 open bug)
Details
Attachments
(3 files, 1 obsolete file)
1.24 KB,
patch
|
Details | Diff | Splinter Review | |
43 bytes,
text/x-github-pull-request
|
Details | Review | |
1.12 KB,
patch
|
gps
:
review-
|
Details | Diff | Splinter Review |
If I understand correctly, running gtests (such as gfx/tests/gtest/TestAsyncPanZoomController.cpp) requires a desktop build. I think this is unfortunate if you're doing B2G development and otherwise have no reason to maintain a desktop build. It would be great if we could run gtests using a B2G build.
Updated•11 years ago
|
Component: Build Config → General
Product: Core → Testing
Comment 1•11 years ago
|
||
Is running gtests on a B2G build merely a convenience, or would we be testing things that we don't have coverage with if we just run with desktop builds?
Reporter | ||
Comment 2•11 years ago
|
||
(In reply to Jonathan Griffin (:jgriffin) from comment #1) > Is running gtests on a B2G build merely a convenience, or would we be > testing things that we don't have coverage with if we just run with desktop > builds? For now, it's just a convenience (a significant one IMO given how long builds take), but b2g-specific gtests could conceivably be written in the future.
Comment 3•11 years ago
|
||
I think Josh was looking into this already. Not sure if he made any progress or not.
Updated•11 years ago
|
Flags: needinfo?(joshmoz)
I was looking into it, made some progress, but it turns out to be unnecessary for my work to continue now so I'm not working on it any more. Sorry.
Flags: needinfo?(joshmoz)
Comment 5•11 years ago
|
||
We are implementing b2g specific video encoding module and it needs to have a b2g emulator environment to test our modules.
Comment 6•10 years ago
|
||
Hi Benoit, Do we have plan to enable it? We want to write some c++ test cases for modules work on b2g platform.
Flags: needinfo?(bgirard)
Comment 7•10 years ago
|
||
No, either you would have to staff this or maybe ask ATeam to look at this.
Flags: needinfo?(bgirard)
Comment 8•10 years ago
|
||
Here is the manual way to run gtest on b2g (tested on the emulator): 1. apply the patch to install gtest files when packing b2g 2. go to the object directory of gecko (ex: objdir-gecko) 3. make -C toolkit/library gtestxul (build gtest libraries) 4. make package (pack gtest files) 5. launch emulator or device 6. adb remount && adb push dist/b2g/dependentlibs.list.gtest /system/b2g && adb push dist/b2g/gtest/libxul.so /system/b2g/gtest/libxul.so (deploy gtest files onto the device/emulator) 7. adb shell stop b2g && adb shell "export MOZ_RUN_GTEST=1 && /system/bin/b2g.sh" (restart b2g process and run gtest)
Comment 9•10 years ago
|
||
Hi Benwa, Sorry to bother you. Do you have bandwith to do this task?
Flags: needinfo?(bgirard)
Comment 10•10 years ago
|
||
Hi Benwa, Please see comment 8. We can now run gtest on b2g following the steps listed in comment 8. We need someone familiar with test scripts to integrate these manual steps into automation. Thanks.
Updated•10 years ago
|
Assignee: jwwang → nobody
Comment 11•10 years ago
|
||
The steps in Comment 8 look great. Having this run in automation shouldn't be too much effort if the current tests don't fail on b2g. But I currently have other bugs I'm looking into so I don't have time to look at this.
Flags: needinfo?(bgirard)
Comment 12•10 years ago
|
||
I think dminor had been thinking about doing the work to run gtests from packaged builds (bug 992983), he might be interested in picking this up. Most of the work in comment 8 is just the work necessary to get gtests running from packaged builds, which is desirable for other reasons.
Depends on: 992983
Comment 13•10 years ago
|
||
I think it is more convenient to build gtest files into libxul when an env variable is on (ex: export ENALBE_GTEST=1 in .userconfig) instead of building another libxul which contains gtest files. By doing so, we can just call |./flash.sh gecko| to deploy the binaries to the device. Btw, I don't see much difference between the file size of stripped libxul with/without gtest files.
Comment 14•10 years ago
|
||
David, I am close to getting GTests working on Windows, but I won't have time to get it working on B2G. Could you try to drive this from your end by letting your management know that it is important for mozilla::pkix and other PSM stuff?
Flags: needinfo?(dkeeler)
Comment 15•10 years ago
|
||
David, never mind. I have another idea for getting these tests working on B2G and solving other (performance) problems. I will talk to you about it via email later this week.
Flags: needinfo?(dkeeler)
Assignee | ||
Comment 16•10 years ago
|
||
Hi Brian, Is there any updates about this bug? Thanks.
Flags: needinfo?(brian)
Comment 17•10 years ago
|
||
(In reply to StevenLee[:slee] from comment #16) > Is there any updates about this bug? No, I'm not working on it.
Flags: needinfo?(brian)
Assignee | ||
Updated•10 years ago
|
Assignee: nobody → slee
Assignee | ||
Comment 18•10 years ago
|
||
This is my plan. 1. Making B2G build system can compile gtest by check an extra flag, B2G_ENABLE_GTEST. 2. Adding one script, run-gtest.sh, to check whether libxul.so with gtest existing then run b2g process with "MOZ_RUN_GTEST=1"
Assignee | ||
Comment 19•10 years ago
|
||
Hi mwu, Can you help review this patch? Thanks
Attachment #8469886 -
Flags: review?(mwu)
Assignee | ||
Comment 20•10 years ago
|
||
Hi mwu, This is another patch for adding helper script to run gtest.
Attachment #8469887 -
Flags: review?(mwu)
Comment 21•10 years ago
|
||
Comment on attachment 8469886 [details] [review] part1: build gtest from gonk-misc You need to make this change on the gecko build system side.
Attachment #8469886 -
Flags: review?(mwu) → review-
Assignee | ||
Comment 22•10 years ago
|
||
From comment 21, mwu suggested building gtest from gecko side. Hi ted, Could you help review this patch? Thanks
Attachment #8469886 -
Attachment is obsolete: true
Attachment #8471324 -
Flags: review?(ted)
Comment 23•10 years ago
|
||
Comment on attachment 8471324 [details] [diff] [review] part 1 - build gtest from mach Review of attachment 8471324 [details] [diff] [review]: ----------------------------------------------------------------- I'm going to punt this to gps as he has more insight on mach commands.
Attachment #8471324 -
Flags: review?(ted) → review?(gps)
Comment 24•10 years ago
|
||
Comment on attachment 8471324 [details] [diff] [review] part 1 - build gtest from mach Review of attachment 8471324 [details] [diff] [review]: ----------------------------------------------------------------- I'm not a huge fan of this approach. First, the command name "build-gtest" is a bit misleading. While it does "build," that's not the main intent of the command and that's confusing. The approach I'd like to see is |mach gtest| doing the right thing, preferably automatically. If we can detect that the build is intended for b2g and an emulator is available, and there's no reason to do a local gtest run (I'm guessing that's not even possible since you'd be cross-compiling, right?), then we should do all the steps in this patch automatically. In other words, mach gtest should have separate code paths depending on the environment. It should abstract away implementation details and "just work." If we can't automatically do the right thing, we should introduce a --remote flag to force remote execution. Worst case, we add |mach gtest-remote| to mirror the existing convention. What do you think?
Attachment #8471324 -
Flags: review?(gps) → review-
Comment 25•10 years ago
|
||
Comment on attachment 8469887 [details] [review] part2: helper script to run gtest Clearing review for now until there is agreement on how to build gtest.
Attachment #8469887 -
Flags: review?(mwu)
Reporter | ||
Comment 26•9 years ago
|
||
Steven, do you plan on continuing to work on this? I'd really like to see this fixed because I do my day-to-day development on a b2g build, and not being able to run gtests on that build means I have to choose between: - also maintaining a desktop build and updating it all the time - always pushing to Try (overkill for small, localized patches) - landing on inbound without confidence that gtests pass, risking a backout
Flags: needinfo?(slee)
Reporter | ||
Comment 27•9 years ago
|
||
(I personally have stopped caring about this as I now mostly work with desktop builds, but this ability is still likely to be useful for others.)
Flags: needinfo?(sthugo)
Updated•7 years ago
|
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•