Open Bug 872145 Opened 11 years ago Updated 2 years ago

mozbuild/backend/test -vs- common.py -- error reporting

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(Not tracked)

People

(Reporter: joey, Unassigned)

Details

python/mozbuild/mozbuild/test/common.py
=======================================
CONFIGS = {
  $var: {
     'defines': [],
     'non_global_defines': [],
     'substs': [],
  }
}


Structures in the common.py::CONFIG dictionary should either have default values supplied automatically for record fields.  Or sanity check the record list to verify all keys are present.

Adding new content for a variable conversion but omitting fields like 'substs' as not being needed can create a mildly cryptic error to track down.


ERROR: Ensure PREF_JS_EXPORTS is written out correctly.
Traceback (most recent call last):
  File "python/mozbuild/mozbuild/test/backend/test_recursivemake.py", line 181, in test_preferences_js
    env = self._consume('preferences_js', RecursiveMakeBackend)
  File "python/mozbuild/mozbuild/test/backend/common.py", line 105, in _consume
    env, objs = self._emit(name)
  File "python/mozbuild/mozbuild/test/backend/common.py", line 98, in _emit
    env = self._get_environment(name)
  File "python/mozbuild/mozbuild/test/backend/common.py", line 94, in _get_environment
    config['substs'].append(('top_srcdir', srcdir))
KeyError: u'substs'
s/record fields/required fields/
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.