Backed out 5 changesets (bug 1255485) for mochitest failures on test/mochitest/test_hangui.xul

Backed out changeset 90b7449882b6 (bug 1255485)
Backed out changeset 5672cf8d324b (bug 1255485)
Backed out changeset ed6dd4aefadb (bug 1255485)
Backed out changeset 0ba36c0feddb (bug 1255485)
Backed out changeset 51af06b6123c (bug 1255485)
This commit is contained in:
Gurzau Raul 2018-01-23 02:01:43 +02:00
parent 8dd83abf28
commit bbe856eaf5
27 changed files with 36 additions and 154 deletions

View File

@ -17,6 +17,10 @@ MOZ_WINCONSOLE = 0
endif
endif
# This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
# shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
NSDISTMODE = copy
include $(topsrcdir)/config/config.mk
# If we are trying to show an error dialog about the lack of SSE2 support,
@ -42,7 +46,7 @@ ifneq (,$(filter-out WINNT,$(OS_ARCH)))
ifdef COMPILE_ENVIRONMENT
libs::
cp -p $(DIST)/bin/$(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
cp -p $(MOZ_APP_NAME)$(BIN_SUFFIX) $(DIST)/bin/$(MOZ_APP_NAME)-bin$(BIN_SUFFIX)
endif
GARBAGE += $(addprefix $(FINAL_TARGET)/defaults/pref/, firefox.js)

View File

@ -328,7 +328,7 @@ else
# This isn't laid out as conditional directives so that NSDISTMODE can be
# target-specific.
INSTALL = $(if $(filter absolute_symlink, $(NSDISTMODE)), $(NSINSTALL) -L $(PWD), $(NSINSTALL) -R)
INSTALL = $(if $(filter copy, $(NSDISTMODE)), $(NSINSTALL) -t, $(if $(filter absolute_symlink, $(NSDISTMODE)), $(NSINSTALL) -L $(PWD), $(NSINSTALL) -R))
endif # WINNT

View File

@ -7,8 +7,8 @@
ifndef NO_DIST_INSTALL
ifneq (,$(strip $(SIMPLE_PROGRAMS)$(RUST_PROGRAMS)))
PROGRAMS_EXECUTABLES = $(SIMPLE_PROGRAMS) $(RUST_PROGRAMS)
ifneq (,$(strip $(PROGRAM)$(SIMPLE_PROGRAMS)$(RUST_PROGRAMS)))
PROGRAMS_EXECUTABLES = $(SIMPLE_PROGRAMS) $(PROGRAM) $(RUST_PROGRAMS)
PROGRAMS_DEST ?= $(FINAL_TARGET)
PROGRAMS_TARGET := target
INSTALL_TARGETS += PROGRAMS

View File

@ -552,11 +552,11 @@ endef
# PROGRAM = Foo
# creates OBJS, links with LIBS to create Foo
#
$(PROGRAM): $(PROGOBJS) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS) $(call mkdir_deps,$(FINAL_TARGET))
$(PROGRAM): $(PROGOBJS) $(STATIC_LIBS_DEPS) $(EXTRA_DEPS) $(RESFILE) $(GLOBAL_DEPS)
$(REPORT_BUILD)
@$(RM) $@.manifest
ifeq (_WINNT,$(GNU_CC)_$(OS_ARCH))
$(EXPAND_LINK) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) -IMPLIB:$(basename $(@F)).lib $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
$(EXPAND_LINK) -NOLOGO -OUT:$@ -PDB:$(LINK_PDBFILE) $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(MOZ_PROGRAM_LDFLAGS) $(PROGOBJS) $(RESFILE) $(STATIC_LIBS) $(SHARED_LIBS) $(OS_LIBS)
ifdef MSMANIFEST_TOOL
@if test -f $@.manifest; then \
if test -f '$(srcdir)/$@.manifest'; then \
@ -817,7 +817,7 @@ endif
endif
ifdef MOZ_CRASHREPORTER
$(foreach file,$(DUMP_SYMS_TARGETS),$(eval $(call syms_template,$(file),$(notdir $(file))_syms.track)))
$(foreach file,$(DUMP_SYMS_TARGETS),$(eval $(call syms_template,$(file),$(file)_syms.track)))
else ifneq (,$(and $(LLVM_SYMBOLIZER),$(filter WINNT,$(OS_ARCH)),$(MOZ_AUTOMATION)))
$(foreach file,$(DUMP_SYMS_TARGETS),$(eval $(call syms_template,$(file),$(addsuffix .pdb,$(basename $(file))))))
PDB_FILES = $(addsuffix .pdb,$(basename $(DUMP_SYMS_TARGETS)))

View File

@ -10,6 +10,10 @@ MOZ_WINCONSOLE = 0
endif
endif
# This switches $(INSTALL) to copy mode, like $(SYSINSTALL), so things that
# shouldn't get 755 perms need $(IFLAGS1) for either way of calling nsinstall.
NSDISTMODE = copy
include $(topsrcdir)/config/config.mk
include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,5 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
NSDISTMODE = copy

View File

@ -64,4 +64,4 @@ FINAL_TARGET_PP_FILES += ['js-gdb.py.in']
OBJDIR_FILES.js.src.shell += ['!/dist/bin/js-gdb.py']
# People expect the js shell to wind up in the top-level JS dir.
OBJDIR_FILES.js.src += ['!/dist/bin/js%s' % CONFIG['BIN_SUFFIX']]
OBJDIR_FILES.js.src += ['!js%s' % CONFIG['BIN_SUFFIX']]

View File

@ -0,0 +1,6 @@
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
NSDISTMODE = copy

View File

@ -8,5 +8,5 @@ XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
if CONFIG['OS_TARGET'] != 'Android':
TEST_HARNESS_FILES.xpcshell.modules.libmar.tests.unit += [
'!/dist/bin/signmar%s' % CONFIG['BIN_SUFFIX'],
'!../tool/signmar%s' % CONFIG['BIN_SUFFIX'],
]

View File

@ -1129,7 +1129,7 @@ class RecursiveMakeBackend(CommonBackend):
))
def _process_program(self, obj, backend_file):
backend_file.write('PROGRAM = %s\n' % self._pretty_path(obj.output_path, backend_file))
backend_file.write('PROGRAM = %s\n' % obj.program)
if not obj.cxx_link and not self.environment.bin_suffix:
backend_file.write('PROG_IS_C_ONLY_%s := 1\n' % obj.program)

View File

@ -17,7 +17,6 @@ structures.
from __future__ import absolute_import, unicode_literals
from mozbuild.frontend.context import ObjDirPath
from mozbuild.util import StrictOrderingOnAppendList
from mozpack.chrome.manifest import ManifestEntry
@ -85,10 +84,6 @@ class ContextDerived(TreeMetadata):
def install_target(self):
return self._context['FINAL_TARGET']
@property
def installed(self):
return self._context['DIST_INSTALL'] is not False
@property
def defines(self):
defines = self._context['DEFINES']
@ -431,13 +426,6 @@ class BaseProgram(Linkable):
self.program = program
self.is_unit_test = is_unit_test
@property
def output_path(self):
if self.installed:
return ObjDirPath(self._context, '!/' + mozpath.join(self.install_target, self.program))
else:
return ObjDirPath(self._context, '!' + self.program)
def __repr__(self):
return '<%s: %s/%s>' % (type(self).__name__, self.relobjdir, self.program)

View File

@ -799,7 +799,6 @@ class TreeMetadataEmitter(LoggingMixin):
self._libs[libname].append(lib)
self._linkage.append((context, lib, 'USE_LIBS'))
linkables.append(lib)
if not lib.installed:
generated_files.add(lib.lib_name)
if symbols_file and isinstance(symbols_file, SourcePath):
script = mozpath.join(

View File

@ -188,14 +188,6 @@ CONFIGS = defaultdict(lambda: {
'OS_TARGET': 'Darwin',
},
},
'program-paths': {
'defines': {},
'non_global_defines': [],
'substs': {
'COMPILE_ENVIRONMENT': '1',
'BIN_SUFFIX': '.prog',
},
},
})

View File

@ -1,4 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
Program('dist-bin')

View File

@ -1,5 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
DIST_SUBDIR = 'foo'
Program('dist-subdir')

View File

@ -1,5 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
FINAL_TARGET = 'final/target'
Program('final-target')

View File

@ -1,13 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
@template
def Program(name):
PROGRAM = name
DIRS += [
'dist-bin',
'dist-subdir',
'final-target',
'not-installed',
]

View File

@ -1,5 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
DIST_INSTALL = False
Program('not-installed')

View File

@ -992,25 +992,6 @@ class TestRecursiveMakeBackend(BackendTester):
# way to iterate the manifest.
self.assertFalse('instrumentation/./not_packaged.java' in m)
def test_program_paths(self):
"""PROGRAMs with various moz.build settings that change the destination should produce
the expected paths in backend.mk."""
env = self._consume('program-paths', RecursiveMakeBackend)
expected = [
('dist-bin', '$(DEPTH)/dist/bin/dist-bin.prog'),
('dist-subdir', '$(DEPTH)/dist/bin/foo/dist-subdir.prog'),
('final-target', '$(DEPTH)/final/target/final-target.prog'),
('not-installed', 'not-installed.prog'),
]
prefix = 'PROGRAM = '
for (subdir, expected_program) in expected:
with open(os.path.join(env.topobjdir, subdir, 'backend.mk'), 'rb') as fh:
lines = fh.readlines()
program = [line.rstrip().split(prefix, 1)[1] for line in lines
if line.startswith(prefix)][0]
self.assertEqual(program, expected_program)
if __name__ == '__main__':
main()

View File

@ -1,4 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
Program('dist-bin')

View File

@ -1,5 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
DIST_SUBDIR = 'foo'
Program('dist-subdir')

View File

@ -1,5 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
FINAL_TARGET = 'final/target'
Program('final-target')

View File

@ -1,13 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
@template
def Program(name):
PROGRAM = name
DIRS += [
'dist-bin',
'dist-subdir',
'final-target',
'not-installed',
]

View File

@ -1,5 +0,0 @@
# Any copyright is dedicated to the Public Domain.
# http://creativecommons.org/publicdomain/zero/1.0/
DIST_INSTALL = False
Program('not-installed')

View File

@ -654,19 +654,6 @@ class TestEmitterBasic(unittest.TestCase):
self.assertEqual(objs[3].program, 'test_program1.prog')
self.assertEqual(objs[4].program, 'test_program2.prog')
def test_program_paths(self):
"""Various moz.build settings that change the destination of PROGRAM should be
accurately reflected in Program.output_path."""
reader = self.reader('program-paths')
objs = self.read_topsrcdir(reader)
prog_paths = [o.output_path for o in objs if isinstance(o, Program)]
self.assertEqual(prog_paths, [
'!/dist/bin/dist-bin.prog',
'!/dist/bin/foo/dist-subdir.prog',
'!/final/target/final-target.prog',
'!not-installed.prog',
])
def test_test_manifest_missing_manifest(self):
"""A missing manifest file should result in an error."""
reader = self.reader('test-manifest-missing-manifest')

View File

@ -612,26 +612,6 @@ class Dumper:
# Platform-specific subclasses. For the most part, these just have
# logic to determine what files to extract symbols from.
def locate_pdb(path):
'''Given a path to a binary, attempt to locate the matching pdb file with simple heuristics:
* Look for a pdb file with the same base name next to the binary
* Look for a pdb file with the same base name in the cwd
Returns the path to the pdb file if it exists, or None if it could not be located.
'''
path, ext = os.path.splitext(path)
pdb = path + '.pdb'
if os.path.isfile(pdb):
return pdb
# If there's no pdb next to the file, see if there's a pdb with the same root name
# in the cwd. We build some binaries directly into dist/bin, but put the pdb files
# in the relative objdir, which is the cwd when running this script.
base = os.path.basename(pdb)
pdb = os.path.join(os.getcwd(), base)
if os.path.isfile(pdb):
return pdb
return None
class Dumper_Win32(Dumper):
fixedFilenameCaseCache = {}
@ -639,13 +619,14 @@ class Dumper_Win32(Dumper):
"""This function will allow processing of exe or dll files that have pdb
files with the same base name next to them."""
if file.endswith(".exe") or file.endswith(".dll"):
if locate_pdb(file) is not None:
path, ext = os.path.splitext(file)
if os.path.isfile(path + ".pdb"):
return True
return False
def CopyDebug(self, file, debug_file, guid, code_file, code_id):
file = locate_pdb(file)
file = "%s.pdb" % os.path.splitext(file)[0]
def compress(path):
compressed_file = path[:-1] + '_'
# ignore makecab's output

View File

@ -484,7 +484,8 @@ class TestFunctional(HelperMixin, unittest.TestCase):
'win32',
'dump_syms_vc{_MSC_VER}.exe'.format(**buildconfig.substs))
self.target_bin = os.path.join(buildconfig.topobjdir,
'dist', 'bin',
'browser',
'app',
'firefox.exe')
else:
self.dump_syms = os.path.join(buildconfig.topobjdir,
@ -503,7 +504,6 @@ class TestFunctional(HelperMixin, unittest.TestCase):
dist_include_manifest = os.path.join(buildconfig.topobjdir,
'_build_manifests/install/dist_include')
dist_include = os.path.join(buildconfig.topobjdir, 'dist/include')
browser_app = os.path.join(buildconfig.topobjdir, 'browser/app')
output = subprocess.check_output([sys.executable,
self.script_path,
'--vcs-info',
@ -513,8 +513,7 @@ class TestFunctional(HelperMixin, unittest.TestCase):
self.dump_syms,
self.test_dir,
self.target_bin],
stderr=open(os.devnull, 'w'),
cwd=browser_app)
stderr=open(os.devnull, 'w'))
lines = filter(lambda x: x.strip(), output.splitlines())
self.assertEqual(1, len(lines),
'should have one filename in the output')