add ability in mozinfo to determine if the build is asan

RESOLVED FIXED in mozilla23

Status

Testing
Mozbase
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: jmaher, Assigned: jmaher)

Tracking

unspecified
mozilla23
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
I would like to replace (http://mxr.mozilla.org/mozilla-central/source/testing/mochitest/runtests.py#515):
automation.IS_DEBUG_BUILD

with mozinfo, maybe something like:
mozinfo.isDebug
(Assignee)

Comment 1

5 years ago
I would also like to determine if we are running in an ASAN build:
http://mxr.mozilla.org/mozilla-central/source/build/automation.py.in#871
writemozinfo.py already sticks a .debug field in there:
http://mxr.mozilla.org/mozilla-central/source/config/writemozinfo.py#78

You can add any other fields you like using writemozinfo.py. mozinfo on its own has no way to get this information.
(Assignee)

Comment 3

5 years ago
hmm, so maybe I should be using mozinfo.json instead of 'import mozinfo'.  What would be preferred in our core test harnesses as we move towards mozbase?
We need to use mozinfo.json. There's just no way for mozinfo to determine most of this information, it has to get it from the build system. We should figure out how to better integrate mozinfo.json so that harnesses don't have to resort to hacks like the xpcshell harness does.
(Assignee)

Comment 5

5 years ago
great, I got the debug stuff from mozinfo.json, this is sort of cool!
(Assignee)

Updated

5 years ago
Summary: add ability in mozinfo to determine if the build is debug or opt → add ability in mozinfo to determine if the build is asan
(Assignee)

Comment 6

5 years ago
Created attachment 746390 [details] [diff] [review]
add asan to mozinfo.json (1.0)
Assignee: nobody → jmaher
Status: NEW → ASSIGNED
Attachment #746390 - Flags: review?(ted)
Comment on attachment 746390 [details] [diff] [review]
add asan to mozinfo.json (1.0)

Review of attachment 746390 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. We should really rewrite writemozinfo.py to use the new buildconfig module, since that'd be much simpler:
http://mxr.mozilla.org/mozilla-central/source/config/expandlibs_config.py
Attachment #746390 - Flags: review?(ted) → review+
If such a re-write does happen, I'd like it if whoever did it could also add all the other interpolated values in automation.py.in. We'll need to do this at some point before we can finish porting mochitests to mozbase.
That's mostly bug 746546. We'll need to figure out how to feed automation.py the default app path, which is bug 855262.
https://hg.mozilla.org/mozilla-central/rev/74c461118efb
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.