Merge mozilla-central to mozilla-inbound

This commit is contained in:
Carsten "Tomcat" Book 2014-02-18 14:03:37 +01:00
commit 1c2b6c1db0
24 changed files with 219 additions and 61 deletions

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ae90f9b322509ee09fbd3963bd23e142845613ab"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="258ae6472bd0e87ae074a6b9b464273dc9cfc8d6"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>

View File

@ -11,7 +11,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="ae90f9b322509ee09fbd3963bd23e142845613ab"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="258ae6472bd0e87ae074a6b9b464273dc9cfc8d6"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="3d5c964015967ca8c86abe6dbbebee3cb82b1609"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a314508e397c8f1814228d36259ea8708034444e"/>

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ae90f9b322509ee09fbd3963bd23e142845613ab"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="258ae6472bd0e87ae074a6b9b464273dc9cfc8d6"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="platform_hardware_ril" path="hardware/ril" remote="b2g" revision="eda08beb3ba9a159843c70ffde0f9660ec351eb9"/>

View File

@ -1,4 +1,4 @@
{
"revision": "1adfbae4582a2cebf4b35c822044299aa8dd1026",
"revision": "8d15cd3ac0d07cde9ff36ce611ae47e6ef30d9b0",
"repo_path": "/integration/gaia-central"
}

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ae90f9b322509ee09fbd3963bd23e142845613ab"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="258ae6472bd0e87ae074a6b9b464273dc9cfc8d6"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -10,7 +10,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ae90f9b322509ee09fbd3963bd23e142845613ab"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="258ae6472bd0e87ae074a6b9b464273dc9cfc8d6"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -12,7 +12,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ae90f9b322509ee09fbd3963bd23e142845613ab"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="258ae6472bd0e87ae074a6b9b464273dc9cfc8d6"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ae90f9b322509ee09fbd3963bd23e142845613ab"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="258ae6472bd0e87ae074a6b9b464273dc9cfc8d6"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -11,7 +11,7 @@
</project>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="fake-libdvm" path="dalvik" remote="b2g" revision="d50ae982b19f42f0b66d08b9eb306be81687869f"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="ae90f9b322509ee09fbd3963bd23e142845613ab"/>
<project name="gaia" path="gaia" remote="mozillaorg" revision="258ae6472bd0e87ae074a6b9b464273dc9cfc8d6"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="moztt" path="external/moztt" remote="b2g" revision="3d5c964015967ca8c86abe6dbbebee3cb82b1609"/>
<project name="apitrace" path="external/apitrace" remote="apitrace" revision="a314508e397c8f1814228d36259ea8708034444e"/>

View File

@ -11,7 +11,7 @@
<copyfile dest="Makefile" src="core/root.mk"/>
</project>
<project name="fake-dalvik" path="dalvik" remote="b2g" revision="ca1f327d5acc198bb4be62fa51db2c039032c9ce"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="ae90f9b322509ee09fbd3963bd23e142845613ab"/>
<project name="gaia.git" path="gaia" remote="mozillaorg" revision="258ae6472bd0e87ae074a6b9b464273dc9cfc8d6"/>
<project name="gonk-misc" path="gonk-misc" remote="b2g" revision="78b908b493bfe0b477e3d4f6edec8c46a2c0d096"/>
<project name="rilproxy" path="rilproxy" remote="b2g" revision="827214fcf38d6569aeb5c6d6f31cb296d1f09272"/>
<project name="librecovery" path="librecovery" remote="b2g" revision="84f2f2fce22605e17d511ff1767e54770067b5b5"/>

View File

@ -419,7 +419,14 @@ class MarionetteJSTestCase(CommonTestCase):
if self.oop:
print 'running oop'
result = self.marionette.execute_async_script("""
frame = None
try:
frame = self.marionette.find_element(
'css selector',
'iframe[src*="app://test-container.gaiamobile.org/index.html"]'
)
except NoSuchElementException:
result = self.marionette.execute_async_script("""
let setReq = navigator.mozSettings.createLock().set({'lockscreen.enabled': false});
setReq.onsuccess = function() {
let appsReq = navigator.mozApps.mgmt.getAll();
@ -445,14 +452,14 @@ setReq.onsuccess = function() {
setReq.onerror = function() {
marionetteScriptFinished(false);
}""", script_timeout=60000)
self.assertTrue(result)
self.assertTrue(result)
self.marionette.switch_to_frame(
self.marionette.find_element(
frame = self.marionette.find_element(
'css selector',
'iframe[src*="app://test-container.gaiamobile.org/index.html"]'
))
)
self.marionette.switch_to_frame(frame)
main_process = self.marionette.execute_script("""
return SpecialPowers.isMainProcess();
""")
@ -509,5 +516,8 @@ setReq.onerror = function() {
self.loglines = self.marionette.get_logs()
raise
if self.oop:
self.marionette.switch_to_frame()
self.marionette.execute_script("log('TEST-END: %s');" % self.jsFile.replace('\\', '\\\\'))
self.marionette.test_name = None

View File

@ -569,6 +569,7 @@ class BaseMarionetteTestRunner(object):
self.sdcard = sdcard
self.mixin_run_tests = []
self.manifest_skipped_tests = []
self.tests = []
if testvars:
if not os.path.exists(testvars):
@ -750,15 +751,31 @@ class BaseMarionetteTestRunner(object):
def run_tests(self, tests):
self.reset_test_stats()
starttime = datetime.utcnow()
if not self.httpd:
print "starting httpd"
self.start_httpd()
if not self.marionette:
self.start_marionette()
if self.emulator:
self.marionette.emulator.wait_for_homescreen(self.marionette)
# Retrieve capabilities for later use
if not self._capabilities:
self.capabilities
if self.capabilities['device'] != 'desktop':
self.textrunnerclass = B2GMarionetteTextTestRunner
for test in tests:
self.add_test(test)
counter = self.repeat
while counter >=0:
round = self.repeat - counter
if round > 0:
self.logger.info('\nREPEAT %d\n-------' % round)
if self.shuffle:
random.shuffle(tests)
for test in tests:
self.run_test(test)
self.run_test_sets()
counter -= 1
self.logger.info('\nSUMMARY\n-------')
self.logger.info('passed: %d' % self.passed)
@ -795,21 +812,17 @@ class BaseMarionetteTestRunner(object):
for run_tests in self.mixin_run_tests:
run_tests(tests)
def run_test(self, test, expected='pass'):
if not self.httpd:
print "starting httpd"
self.start_httpd()
def add_test(self, test, expected='pass', oop=None):
filepath = os.path.abspath(test)
if not self.marionette:
self.start_marionette()
if self.emulator:
self.marionette.emulator.wait_for_homescreen(self.marionette)
# Retrieve capabilities for later use
if not self._capabilities:
self.capabilities
if self.capabilities['device'] != 'desktop':
self.textrunnerclass = B2GMarionetteTextTestRunner
if os.path.isdir(filepath):
for root, dirs, files in os.walk(filepath):
for filename in files:
if ((filename.startswith('test_') or filename.startswith('browser_')) and
(filename.endswith('.py') or filename.endswith('.js'))):
filepath = os.path.join(root, filename)
self.add_test(filepath)
return
testargs = {}
if self.type is not None:
@ -821,29 +834,11 @@ class BaseMarionetteTestRunner(object):
testargs.update({ atype[1:]: 'false' })
else:
testargs.update({ atype: 'true' })
oop = testargs.get('oop', False)
if isinstance(oop, basestring):
oop = False if oop == 'false' else 'true'
filepath = os.path.abspath(test)
# testarg_oop = either None, 'true' or 'false'.
testarg_oop = testargs.get('oop')
if os.path.isdir(filepath):
for root, dirs, files in os.walk(filepath):
if self.shuffle:
random.shuffle(files)
for filename in files:
if ((filename.startswith('test_') or filename.startswith('browser_')) and
(filename.endswith('.py') or filename.endswith('.js'))):
filepath = os.path.join(root, filename)
self.run_test(filepath)
if self.marionette.check_for_crash():
return
return
mod_name,file_ext = os.path.splitext(os.path.split(filepath)[-1])
testloader = unittest.TestLoader()
suite = unittest.TestSuite()
file_ext = os.path.splitext(os.path.split(filepath)[-1])[1]
if file_ext == '.ini':
manifest = TestManifest()
@ -861,6 +856,11 @@ class BaseMarionetteTestRunner(object):
else:
unfiltered_tests.append(test)
# Don't filter tests with "oop" flag because manifest parser can't
# handle it well.
if testarg_oop is not None:
del testargs['oop']
target_tests = manifest.get(tests=unfiltered_tests, **testargs)
for test in unfiltered_tests:
if test['path'] not in [x['path'] for x in target_tests]:
@ -873,22 +873,62 @@ class BaseMarionetteTestRunner(object):
test['disabled']))
self.todo += 1
if self.shuffle:
random.shuffle(target_tests)
for i in target_tests:
if not os.path.exists(i["path"]):
raise IOError("test file: %s does not exist" % i["path"])
self.run_test(i["path"], i["expected"])
if self.marionette.check_for_crash():
return
# manifest_oop is either 'false', 'true' or 'both'. Anything
# else implies 'false'.
manifest_oop = i.get('oop', 'false')
# We only add an oop test when following conditions are met:
# 1) It's written by javascript because we have only
# MarionetteJSTestCase that supports oop mode.
# 2) we're running with "--type=+oop" or no "--type=-oop", which
# follows testarg_oop is either None or 'true' and must not
# be 'false'.
# 3) When no "--type=[+-]oop" is applied, all active tests are
# included in target_tests, so we must filter out those
# really capable of running in oop mode. Besides, oop tests
# must be explicitly specified for backward compatibility. So
# test manifest_oop equals to either 'both' or 'true'.
file_ext = os.path.splitext(os.path.split(i['path'])[-1])[-1]
if (file_ext == '.js' and
testarg_oop != 'false' and
(manifest_oop == 'both' or manifest_oop == 'true')):
self.add_test(i["path"], i["expected"], True)
# We only add an in-process test when following conditions are
# met:
# 1) we're running with "--type=-oop" or no "--type=+oop", which
# follows testarg_oop is either None or 'false' and must not
# be 'true'.
# 2) When no "--type=[+-]oop" is applied, all active tests are
# included in target_tests, so we must filter out those
# really capable of running in in-process mode.
if (testarg_oop != 'true' and
(manifest_oop == 'both' or manifest_oop != 'true')):
self.add_test(i["path"], i["expected"], False)
return
self.logger.info('TEST-START %s' % os.path.basename(test))
if oop is None:
# This test is added by directory enumeration or directly specified
# in argument list. We have no manifest information here so we just
# respect the "--type=[+-]oop" argument here.
oop = file_ext == '.js' and testarg_oop == 'true'
self.tests.append({'filepath': filepath, 'expected': expected, 'oop': oop})
def run_test(self, filepath, expected, oop):
self.logger.info('TEST-START %s' % os.path.basename(filepath))
testloader = unittest.TestLoader()
suite = unittest.TestSuite()
self.test_kwargs['expected'] = expected
self.test_kwargs['oop'] = oop
mod_name = os.path.splitext(os.path.split(filepath)[-1])[0]
for handler in self.test_handlers:
if handler.match(os.path.basename(test)):
if handler.match(os.path.basename(filepath)):
handler.add_tests_to_suite(mod_name,
filepath,
suite,
@ -918,6 +958,22 @@ class BaseMarionetteTestRunner(object):
if hasattr(results, 'expectedFailures'):
self.passed += len(results.expectedFailures)
def run_test_set(self, tests):
if self.shuffle:
random.shuffle(tests)
for test in tests:
self.run_test(test['filepath'], test['expected'], test['oop'])
if self.marionette.check_for_crash():
break
def run_test_sets(self):
oop_tests = [x for x in self.tests if x.get('oop')]
self.run_test_set(oop_tests)
in_process_tests = [x for x in self.tests if not x.get('oop')]
self.run_test_set(in_process_tests)
def cleanup(self):
if self.httpd:
self.httpd.stop()

View File

@ -0,0 +1,16 @@
[DEFAULT]
qemu = false
browser = false
b2g = true
skip = false
oop = both
[test_success_both2.js]
; oop unspecified
[test_success_in_non_oop.js]
oop = false
[test_success_in_oop.js]
oop = true
[test_success_both.js]
oop = both

View File

@ -0,0 +1,16 @@
[DEFAULT]
qemu = false
browser = false
b2g = true
skip = false
oop = false
[test_success_in_non_oop2.js]
; oop unspecified
[test_success_in_non_oop.js]
oop = false
[test_success_in_oop.js]
oop = true
[test_success_both.js]
oop = both

View File

@ -0,0 +1,16 @@
[DEFAULT]
qemu = false
browser = false
b2g = true
skip = false
oop = true
[test_success_in_oop2.js]
; oop unspecified
[test_success_in_non_oop.js]
oop = false
[test_success_in_oop.js]
oop = true
[test_success_both.js]
oop = both

View File

@ -0,0 +1,14 @@
[DEFAULT]
qemu = false
browser = false
b2g = true
skip = false
[test_success_in_non_oop2.js]
; oop unspecified
[test_success_in_non_oop.js]
oop = false
[test_success_in_oop.js]
oop = true
[test_success_both.js]
oop = both

View File

@ -0,0 +1,10 @@
[DEFAULT]
qemu = false
browser = false
b2g = true
skip = false
[include:manifest-oop-unspecified.ini]
[include:manifest-oop-both.ini]
[include:manifest-oop-true.ini]
[include:manifest-oop-false.ini]

View File

@ -0,0 +1,3 @@
MARIONETTE_TIMEOUT = 60000;
ok(true, "Always success");
finish();

View File

@ -0,0 +1,3 @@
MARIONETTE_TIMEOUT = 60000;
ok(true, "Always success");
finish();

View File

@ -0,0 +1,3 @@
MARIONETTE_TIMEOUT = 60000;
ok(SpecialPowers.isMainProcess(), "SpecialPowers.isMainProcess()");
finish();

View File

@ -0,0 +1,3 @@
MARIONETTE_TIMEOUT = 60000;
ok(SpecialPowers.isMainProcess(), "SpecialPowers.isMainProcess()");
finish();

View File

@ -0,0 +1,3 @@
MARIONETTE_TIMEOUT = 60000;
ok(!SpecialPowers.isMainProcess(), "SpecialPowers.isMainProcess()");
finish();

View File

@ -0,0 +1,3 @@
MARIONETTE_TIMEOUT = 60000;
ok(!SpecialPowers.isMainProcess(), "SpecialPowers.isMainProcess()");
finish();

View File

@ -104,3 +104,5 @@ disabled = "Bug 925688"
[test_screen_orientation.py]
browser = false
[test_errors.py]
[include:oop/manifest.ini]