Closed Bug 1014804 Opened 11 years ago Closed 11 years ago

gtest_filter option in './mach gtest' not working

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla32

People

(Reporter: botond, Assigned: mstange)

References

Details

Attachments

(1 file)

./mach help gtest has the following option: gtest_filter test_filter is a ':'-separated list of wildcard patterns (called the positive patterns),optionally followed by a '-' and another ':'-separated pattern list (called the negative patterns). However, calling './mach gtest <filter>' has no effect (it does the same thing as just './mach gtest' would), while calling GTEST_FILTER=<filter> MOZ_RUN_GTEST=1 <objdir>/dist/bin/firefox with the same <filter> works correctly. This suggests that something in the build system is not propagating the filter correctly.
This happens because GTestCommands::gtest in mach_commands.py does def gtest(self, shuffle, jobs, gtest_filter, tbpl_parser): # We lazy build gtest because it's slow to link self._run_make(directory="testing/gtest", target='gtest', ensure_exit_code=True) app_path = self.get_binary_path('app') # Use GTest environment variable to control test execution # For details see: # https://code.google.com/p/googletest/wiki/AdvancedGuide#Running_Test_Programs:_Advanced_Options gtest_env = {b'GTEST_FILTER': gtest_filter} [...] and bug 844852 changed the gtest make target to not only build but also run the tests. I don't know why that didn't result in "mach gtest" running the tests twice over here; probably because I currently have one failing test in my tree, which might have caused self._run_make to throw an exception.
Blocks: 844852
Attachment #8434097 - Flags: review?(bgirard) → review+
Comment on attachment 8434097 [details] [diff] [review] make the gtest target only build and not run gtests Since this is a Makefile, I suppose I also need a review from a build peer?
Attachment #8434097 - Flags: review?(ted)
Comment on attachment 8434097 [details] [diff] [review] make the gtest target only build and not run gtests Review of attachment 8434097 [details] [diff] [review]: ----------------------------------------------------------------- Seems unfortunate to duplicate that, but they're right next to each other so ehh. When we get these into the test package we can make it better.
Attachment #8434097 - Flags: review?(ted) → review+
Assignee: nobody → mstange
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: