def _init(self): super(FasterMakeBackend, self)._init() self._manifest_entries = OrderedDefaultDict(set) self._install_manifests = OrderedDefaultDict(InstallManifest) self._dependencies = OrderedDefaultDict(list) self._has_xpidl = False
def _init(self): super(FasterMakeBackend, self)._init() self._seen_directories = set() self._defines = dict() self._manifest_entries = OrderedDefaultDict(list) self._install_manifests = OrderedDefaultDict(OverwriteInstallManifest) self._dependencies = OrderedDefaultDict(list)
def _init(self): super(FasterMakeBackend, self)._init() self._manifest_entries = OrderedDefaultDict(set) self._install_manifests = OrderedDefaultDict(InstallManifest) self._dependencies = OrderedDefaultDict(list) self._l10n_dependencies = OrderedDefaultDict(list) self._has_xpidl = False self._generated_files_map = {} self._generated_files = []
def __init__(self, all_tests, test_defaults=None): self._tests_by_path = OrderedDefaultDict(list) self._tests_by_flavor = defaultdict(set) self._test_dirs = set() with open(all_tests, 'rb') as fh: test_data = pickle.load(fh) defaults = None if test_defaults: with open(test_defaults, 'rb') as fh: defaults = pickle.load(fh) for path, tests in test_data.items(): for metadata in tests: if defaults: defaults_manifests = [metadata['manifest']] ancestor_manifest = metadata.get('ancestor-manifest') if ancestor_manifest: defaults_manifests.append(ancestor_manifest) for manifest in defaults_manifests: manifest_defaults = defaults.get(manifest) if manifest_defaults: metadata = manifestparser.combine_fields( manifest_defaults, metadata) self._tests_by_path[path].append(metadata) self._test_dirs.add(os.path.dirname(path)) flavor = metadata.get('flavor') self._tests_by_flavor[flavor].add(path)
def _init(self): CommonBackend._init(self) self._supported_dirs = ( 'services', 'servo', 'startupcache', 'storage', 'taskcluster', 'testing', 'third_party', 'toolkit', 'tools', 'uriloader', 'view', 'widget', 'xpcom', 'xpfe', ) self._backend_files = {} self._cmd = MozbuildObject.from_environment() self._manifest_entries = OrderedDefaultDict(set) self._compile_env_gen_files = ( '*.c', '*.cpp', '*.h', '*.inc', '*.py', '*.rs', ) # These are 'group' dependencies - All rules that list these as an output # will be built before any rules that list this as an input. self._installed_idls = '$(MOZ_OBJ_ROOT)/<installed-idls>' self._installed_files = '$(MOZ_OBJ_ROOT)/<installed-files>'
def __init__(self, config): self.populate_logger() self.config = config mozinfo.find_and_update_from_json(config.topobjdir) # Python 2.6 doesn't allow unicode keys to be used for keyword # arguments. This gross hack works around the problem until we # rid ourselves of 2.6. self.info = {} for k, v in mozinfo.info.items(): if isinstance(k, unicode): k = k.encode('ascii') self.info[k] = v self._libs = OrderedDefaultDict(list) self._binaries = OrderedDict() self._linkage = [] self._static_linking_shared = set() # Keep track of external paths (third party build systems), starting # from what we run a subconfigure in. We'll eliminate some directories # as we traverse them with moz.build (e.g. js/src). subconfigures = os.path.join(self.config.topobjdir, 'subconfigures') paths = [] if os.path.exists(subconfigures): paths = open(subconfigures).read().splitlines() self._external_paths = set(mozpath.normsep(d) for d in paths) # Add security/nss manually, since it doesn't have a subconfigure. self._external_paths.add('security/nss')
def _init(self): CommonBackend._init(self) self._backend_files = {} self._cmd = MozbuildObject.from_environment() self._manifest_entries = OrderedDefaultDict(set) self._compile_env_gen_files = ( '*.c', '*.cpp', '*.h', '*.inc', '*.py', '*.rs', ) # These are 'group' dependencies - All rules that list these as an output # will be built before any rules that list this as an input. self._installed_idls = '$(MOZ_OBJ_ROOT)/<installed-idls>' self._installed_files = '$(MOZ_OBJ_ROOT)/<installed-files>' # The preprocessor including source-repo.h and buildid.h creates # dependencies that aren't specified by moz.build and cause errors # in Tup. Express these as a group dependency. self._early_generated_files = '$(MOZ_OBJ_ROOT)/<early-generated-files>' self._built_in_addons = set() self._built_in_addons_file = 'dist/bin/browser/chrome/browser/content/browser/built_in_addons.json' # application.ini.h is a special case since we need to process # the FINAL_TARGET_PP_FILES for application.ini before running # the GENERATED_FILES script, and tup doesn't handle the rules # out of order. Similarly, dependentlibs.list uses libxul as # an input, so must be written after the rule for libxul. self._delayed_files = ('application.ini.h', 'dependentlibs.list', 'dependentlibs.list.gtest')
def _init(self): CommonBackend._init(self) self._backend_files = {} self._cmd = MozbuildObject.from_environment() self._manifest_entries = OrderedDefaultDict(set) self._compile_env_gen_files = ( '*.c', '*.cpp', '*.h', '*.inc', '*.py', '*.rs', ) # These are 'group' dependencies - All rules that list these as an output # will be built before any rules that list this as an input. self._installed_idls = '$(MOZ_OBJ_ROOT)/<installed-idls>' self._installed_files = '$(MOZ_OBJ_ROOT)/<installed-files>' # The preprocessor including source-repo.h and buildid.h creates # dependencies that aren't specified by moz.build and cause errors # in Tup. Express these as a group dependency. self._early_generated_files = '$(MOZ_OBJ_ROOT)/<early-generated-files>' self._built_in_addons = set() self._built_in_addons_file = 'dist/bin/browser/chrome/browser/content/browser/built_in_addons.json'
def test_defaults(self): test = OrderedDefaultDict(bool, {'foo': 1}) self.assertEqual(test['foo'], 1) self.assertEqual(test['qux'], False) self.assertEqual(list(test), ['foo', 'qux'])
def test_defaults(self): test = OrderedDefaultDict(bool, {"foo": 1}) self.assertEqual(test["foo"], 1) self.assertEqual(test["qux"], False) self.assertEqual(list(test), ["foo", "qux"])
def _init(self): CommonBackend._init(self) self._backend_files = {} self._cmd = MozbuildObject.from_environment() self._manifest_entries = OrderedDefaultDict(set) # This is a 'group' dependency - All rules that list this as an output # will be built before any rules that list this as an input. self._installed_files = '$(MOZ_OBJ_ROOT)/<installed-files>'
def test_simple(self): original = OrderedDict(foo=1, bar=2) test = OrderedDefaultDict(bool, original) self.assertEqual(original, test) self.assertEqual(test['foo'], 1) self.assertEqual(list(test), ['foo', 'bar'])
def test_simple(self): original = OrderedDict(foo=1, bar=2) test = OrderedDefaultDict(bool, original) self.assertEqual(original, test) self.assertEqual(test["foo"], 1) self.assertEqual(list(test), ["foo", "bar"])
def _init(self): CommonBackend._init(self) self._backend_files = {} self._cmd = MozbuildObject.from_environment() self._manifest_entries = OrderedDefaultDict(set) # These are a hack to approximate things that are needed for the # compile phase. self._compile_env_files = ( '*.api', '*.c', '*.cfg', '*.cpp', '*.h', '*.inc', '*.msg', '*.py', '*.rs', ) # These are 'group' dependencies - All rules that list these as an output # will be built before any rules that list this as an input. self._installed_idls = '$(MOZ_OBJ_ROOT)/<installed-idls>' self._installed_files = '$(MOZ_OBJ_ROOT)/<installed-files>' self._rust_libs = '$(MOZ_OBJ_ROOT)/<rust-libs>' # The preprocessor including source-repo.h and buildid.h creates # dependencies that aren't specified by moz.build and cause errors # in Tup. Express these as a group dependency. self._early_generated_files = '$(MOZ_OBJ_ROOT)/<early-generated-files>' self._shlibs = '$(MOZ_OBJ_ROOT)/<shlibs>' self._gtests = '$(MOZ_OBJ_ROOT)/<gtest>' self._default_group = '$(MOZ_OBJ_ROOT)/<default>' # The two rust libraries in the tree share many prerequisites, so we need # to prune common dependencies and therefore build all rust from the same # Tupfile. self._rust_outputs = set() self._rust_backend_file = self._get_backend_file( 'toolkit/library/rust') self._built_in_addons = set() self._built_in_addons_file = 'dist/bin/browser/chrome/browser/content/browser/built_in_addons.json'
def _init(self): CommonBackend._init(self) self._backend_files = {} self._cmd = MozbuildObject.from_environment() self._manifest_entries = OrderedDefaultDict(set) self._compile_env_gen_files = ( '*.c', '*.cpp', '*.h', '*.inc', '*.py', '*.rs', ) # These are 'group' dependencies - All rules that list these as an output # will be built before any rules that list this as an input. self._installed_idls = '$(MOZ_OBJ_ROOT)/<installed-idls>' self._installed_files = '$(MOZ_OBJ_ROOT)/<installed-files>'
def __init__(self, all_tests, srcdir, test_defaults=None): self._tests_by_path = OrderedDefaultDict(list) self._tests_by_flavor = defaultdict(set) self._test_dirs = set() self._objdir = os.path.abspath(os.path.join(all_tests, os.pardir)) self._wpt_loaded = False self._srcdir = srcdir with open(all_tests, 'rb') as fh: test_data = pickle.load(fh) defaults = None if test_defaults: with open(test_defaults, 'rb') as fh: defaults = pickle.load(fh) for path, tests in test_data.items(): for metadata in tests: if defaults: defaults_manifests = [metadata['manifest']] ancestor_manifest = metadata.get('ancestor-manifest') if ancestor_manifest: # The (ancestor manifest, included manifest) tuple # contains the defaults of the included manifest, so # use it instead of [metadata['manifest']]. defaults_manifests[0] = (ancestor_manifest, metadata['manifest']) defaults_manifests.append(ancestor_manifest) for manifest in defaults_manifests: manifest_defaults = defaults.get(manifest) if manifest_defaults: metadata = manifestparser.combine_fields( manifest_defaults, metadata) self._tests_by_path[path].append(metadata) self._test_dirs.add(os.path.dirname(path)) flavor = metadata.get('flavor') self._tests_by_flavor[flavor].add(path)
def _reset_state(self): self._tests_by_path = OrderedDefaultDict(list) self._tests_by_flavor = defaultdict(set) self._test_dirs = set()