Mach should print environment info on failure

RESOLVED FIXED in mozilla26

Status

()

Core
Build Config
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: gps, Assigned: gps)

Tracking

(Blocks: 1 bug)

unspecified
mozilla26
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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.
(Assignee)

Comment 1

4 years ago
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
(Assignee)

Comment 2

4 years ago
Created attachment 784521 [details] [diff] [review]
mach command to dump environment and build config info

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)

Updated

4 years ago
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+
(Assignee)

Comment 4

4 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/429f7afd4479
Status: NEW → ASSIGNED
Flags: in-testsuite-
https://hg.mozilla.org/mozilla-central/rev/429f7afd4479
Status: ASSIGNED → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Blocks: 998104
You need to log in before you can comment on or make changes to this bug.