Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
merge default -> production
Browse files Browse the repository at this point in the history
--HG--
branch : production
  • Loading branch information
escapewindow committed Feb 6, 2013
2 parents 89fbaca + abcfbfd commit 1f11d52
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 19 deletions.
4 changes: 4 additions & 0 deletions .hgtags
Expand Up @@ -911,3 +911,7 @@ a60c52bb02c2234f9ff5008d3a5823e5717dbcf2 FENNEC_19_0b3_BUILD1
4af241ce3165e638b0ce4fe89c3a8aa037d4449a FIREFOX_19_0b4_BUILD1
7ff8e2bda5f6aca427b0c312a66ee8248c0b5c0c FIREFOX_18_0_2_RELEASE
7ff8e2bda5f6aca427b0c312a66ee8248c0b5c0c FIREFOX_18_0_2_BUILD1
97105473df0a9315649def6643f23745d90f0290 FENNEC_19_0b5_RELEASE
97105473df0a9315649def6643f23745d90f0290 FENNEC_19_0b5_BUILD1
97105473df0a9315649def6643f23745d90f0290 FIREFOX_19_0b5_RELEASE
97105473df0a9315649def6643f23745d90f0290 FIREFOX_19_0b5_BUILD1
1 change: 1 addition & 0 deletions configs/b2g/panda_releng.py
Expand Up @@ -15,6 +15,7 @@
"default_actions": [
'clobber',
'read-buildbot-config',
'pull',
'create-virtualenv',
'download-and-extract',
'request-device',
Expand Down
6 changes: 3 additions & 3 deletions mozharness/base/vcs/vcsbase.py
Expand Up @@ -121,9 +121,9 @@ def pull(self, num_retries=None, repos=None):
self.info("Pull has nothing to do!")
return
dirs = self.query_abs_dirs()
self.vcs_checkout_repos(self.config['repos'],
parent_dir=dirs['abs_work_dir'],
num_retries=num_retries)
return self.vcs_checkout_repos(self.config['repos'],
parent_dir=dirs['abs_work_dir'],
num_retries=num_retries)

# Specific VCS stubs {{{1
# For ease of use.
Expand Down
17 changes: 14 additions & 3 deletions scripts/b2g_build.py
Expand Up @@ -90,6 +90,12 @@ class B2GBuild(LocalesMixin, MockMixin, BaseScript, VCSMixin, TooltoolMixin, Tra
"dest": "variant",
"help": "b2g build variant. overrides gecko config's value",
}],
[["--additional-source-tarballs"], {
"action": "extend",
"type": "string",
"dest": "additional_source_tarballs",
"help": "Additional source tarballs to extract",
}],
]

def __init__(self, require_config_file=False):
Expand Down Expand Up @@ -384,6 +390,7 @@ def unpack_gonk(self):
dirs = self.query_abs_dirs()
mtime = int(os.path.getmtime(os.path.join(dirs['abs_work_dir'], 'gonk.tar.xz')))
mtime_file = os.path.join(dirs['abs_work_dir'], '.gonk_mtime')
tar = self.query_exe('tar', return_type="list")
if os.path.exists(mtime_file):
try:
prev_mtime = int(self.read_from_file(mtime_file, error_level=INFO))
Expand All @@ -392,16 +399,20 @@ def unpack_gonk(self):
sourcesfile = os.path.join(dirs['work_dir'], 'sources.xml')
sourcesfile_orig = sourcesfile + '.original'
if not os.path.exists(sourcesfile_orig):
self.run_command(["tar", "xf", "gonk.tar.xz", "--strip-components", "1", "B2G_default_*/sources.xml"],
self.run_command(tar + ["xf", "gonk.tar.xz", "--strip-components", "1", "B2G_default_*/sources.xml"],
cwd=dirs['work_dir'])
self.run_command(["cp", "-p", sourcesfile, sourcesfile_orig], cwd=dirs['work_dir'])
# end transition code
self.info("We already have this gonk unpacked; skipping")
return
except:
pass
if self.config.get('additional_source_tarballs'):
for tarball in self.config['additional_source_tarballs']:
self.run_command(tar + ["xf", tarball], cwd=dirs['work_dir'],
halt_on_failure=True)

retval = self.run_command(["tar", "xf", "gonk.tar.xz", "--strip-components", "1"], cwd=dirs['work_dir'])
retval = self.run_command(tar + ["xf", "gonk.tar.xz", "--strip-components", "1"], cwd=dirs['work_dir'])

if retval != 0:
self.fatal("failed to unpack gonk", exit_code=2)
Expand Down Expand Up @@ -466,7 +477,7 @@ def query_do_translate_hg_to_git(self, gecko_config_key=None):
manifest_config = self.config.get('manifest', {})
branch = self.query_branch()
if self.query_is_nightly() and branch in manifest_config['branches'] and \
manifest_config.get('translate_hg_to_git'):
manifest_config.get('translate_hg_to_git'):
if gecko_config_key is None:
return True
if self.gecko_config.get(gecko_config_key):
Expand Down
38 changes: 25 additions & 13 deletions scripts/b2g_panda.py
Expand Up @@ -5,6 +5,7 @@
# You can obtain one at http://mozilla.org/MPL/2.0/.
# ***** END LICENSE BLOCK *****

import copy
import getpass
import os
import sys
Expand All @@ -15,14 +16,14 @@

from mozharness.mozilla.buildbot import TBPL_SUCCESS, TBPL_FAILURE, TBPL_WARNING, BuildbotMixin
from mozharness.base.log import INFO, ERROR
from mozharness.base.python import VirtualenvMixin, virtualenv_config_options
from mozharness.base.script import BaseScript
from mozharness.base.python import VirtualenvMixin
from mozharness.base.vcs.vcsbase import MercurialScript
from mozharness.mozilla.testing.mozpool import MozpoolMixin
from mozharness.mozilla.testing.device import SUTDeviceMozdeviceMixin
from mozharness.mozilla.testing.testbase import TestingMixin
from mozharness.mozilla.testing.testbase import TestingMixin, testing_config_options
from mozharness.mozilla.testing.unittest import TestSummaryOutputParserHelper

class PandaTest(TestingMixin, BaseScript, VirtualenvMixin, MozpoolMixin, BuildbotMixin, SUTDeviceMozdeviceMixin):
class PandaTest(TestingMixin, MercurialScript, VirtualenvMixin, MozpoolMixin, BuildbotMixin, SUTDeviceMozdeviceMixin):
config_options = [
[["--mozpool-api-url"], {
"dest": "mozpool_api_url",
Expand All @@ -40,17 +41,12 @@ class PandaTest(TestingMixin, BaseScript, VirtualenvMixin, MozpoolMixin, Buildbo
"dest": "installer_url",
"help": "Set b2gbase url",
}],
[["--test-url"], {
"action":"store",
"dest": "test_url",
"help": "URL to the zip file containing the actual tests",
}],
[["--test-type"], {
"dest": "test_type",
"default": "b2g",
"help": "Specifies the --type parameter to pass to Marionette",
}],
] + virtualenv_config_options
] + copy.deepcopy(testing_config_options)

error_list = []
mozpool_handler = None
Expand All @@ -60,34 +56,44 @@ class PandaTest(TestingMixin, BaseScript, VirtualenvMixin, MozpoolMixin, Buildbo
'mozpoolclient',
'mozinstall',
{ 'marionette': os.path.join('tests', 'marionette/client') },
{ 'gaiatest': os.path.join('tests', 'gaiatest') },
{ 'gaiatest': 'gaia-ui-tests/' },
]

repos = [{
'repo': 'http://hg.mozilla.org/integration/gaia-ui-tests/',
'revision': 'default',
'dest': 'gaia-ui-tests'
}]

def __init__(self, require_config_file=False):
super(PandaTest, self).__init__(
config_options=self.config_options,
all_actions=['clobber',
'read-buildbot-config',
'pull',
'download-and-extract',
'create-virtualenv',
'request-device',
'run-test',
'close-request'],
default_actions=['clobber',
'pull',
'create-virtualenv',
'download-and-extract',
'request-device',
'run-test',
'close-request'],
require_config_file=require_config_file,
config={'virtualenv_modules': self.virtualenv_modules,
'require_test_zip': True,})
'require_test_zip': True,
'repos': self.repos})

self.mozpool_assignee = self.config.get('mozpool_assignee', getpass.getuser())
self.request_url = None
self.mozpool_device = self.config.get("mozpool_device")
self.installer_url = self.config.get("installer_url")
self.test_url = self.config.get("test_url")
self.gaia_ui_tests_commit = 'unknown'

def postflight_read_buildbot_config(self):
super(PandaTest, self).postflight_read_buildbot_config()
Expand All @@ -111,6 +117,10 @@ def _sut_prep_steps(self):
self.info("Current time on device: %s - %s" % \
(device_time, time.strftime("%x %H:%M:%S", time.gmtime(float(device_time)))))

def pull(self, **kwargs):
repos = super(PandaTest, self).pull(**kwargs)
self.gaia_ui_tests_commit = repos['gaia-ui-tests']['revision']

def run_test(self):
self._sut_prep_steps()

Expand Down Expand Up @@ -145,6 +155,8 @@ def run_test(self):
self.warning("We failed to run logcat: str(%s)" % str(e))

test_summary_parser.print_summary('gaia-ui-tests')
self.info("TinderboxPrint: gaia-ui-tests_revlink: %s/rev/%s" %
(self.config.get('repos')[0], self.gaia_ui_tests_commit))

self.buildbot_status(tbpl_status, level=level)

Expand All @@ -156,7 +168,7 @@ def query_abs_dirs(self):
dirs['abs_test_install_dir'] = os.path.join(
abs_dirs['abs_work_dir'], 'tests')
dirs['abs_gaiatest_dir'] = os.path.join(
dirs['abs_test_install_dir'], 'gaiatest', 'gaiatest')
abs_dirs['abs_work_dir'], 'gaia-ui-tests', 'gaiatest')
for key in dirs.keys():
if key not in abs_dirs:
abs_dirs[key] = dirs[key]
Expand Down

0 comments on commit 1f11d52

Please sign in to comment.