Closed Bug 894973 Opened 12 years ago Closed 12 years ago

Mach should print environment info on failure

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla26

People

(Reporter: gps, Assigned: gps)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

If mach fails for some reason, I think it should print environment info such as the detected topsrcdir and topobjdir, Python version, OS, etc. This will aid in debugging failures.
I'm going to morph this into a mach command that can print info. I reckon we can extend the mach driver to invoke this command if a mach command fails in a followup.
Component: mach → Build Config
The purpose of this new |mach environment| command is for the first step of debugging mach issues to be "please pastebin the output from |mach environment|". If there was will, I imagine we could even implement |mach environment --pastebin| to make this even simpler. Followups. Example output: platform: Darwin-12.4.0-x86_64-i386-64bit python version: 2.7.5 (default, May 18 2013, 20:14:30) [GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] python prefix: /usr/local/Cellar/python/python2.7.5/Frameworks/Python.framework/Versions/2.7 mach cwd: /Users/gps/src/firefox os cwd: /Users/gps/src/firefox mach directory: /Users/gps/simplerrc/firefox state directory: /Users/gps/.mozbuild object directory: /Users/gps/src/firefox/obj-firefox.noindex mozconfig path: /Users/gps/srcc/firefox/.mozconfig mozconfig objdir: /Users/gps/src/firefox/obj-firefoxfox.noindex mozconfig configure args: --enable-application=browser --applicationenable-optimize --with-ccache=/usr/local/bin/ccache --enable-gtest mozbuildzconfig extra make args: AUTOCLOBBER=1 mozconfig make flags: config topsrcdir: /Users/gps/src/firefox config topobjdir: /Users/gps/src/firefox/obj-firefox.noindex
Attachment #784521 - Flags: review?(ted)
Assignee: nobody → gps
Comment on attachment 784521 [details] [diff] [review] mach command to dump environment and build config info Review of attachment 784521 [details] [diff] [review]: ----------------------------------------------------------------- ::: python/mozbuild/mozbuild/mach_commands.py @@ +780,5 @@ > + > + print('object directory:\n\t%s' % mb.topobjdir) > + > + if mozconfig: > + print('mozconfig path:\n\t%s' % mozconfig['path']) Feels like it'd be nicer to put this above the mozconfig evaluation output.
Attachment #784521 - Flags: review?(ted) → review+
Status: NEW → ASSIGNED
Flags: in-testsuite-
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
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: