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 25, 2013
2 parents 4db25e2 + 972c1f1 commit 7136501
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 110 deletions.
17 changes: 0 additions & 17 deletions configs/b2g/releng-beta.py
Expand Up @@ -13,7 +13,6 @@
'update-source-manifest', 'update-source-manifest',
'build', 'build',
'build-symbols', 'build-symbols',
'build-update-testdata',
'make-updates', 'make-updates',
'make-update-xml', 'make-update-xml',
'make-socorro-json', 'make-socorro-json',
Expand All @@ -36,7 +35,6 @@
"hgtool_base_bundle_urls": ["http://ftp.mozilla.org/pub/mozilla.org/firefox/bundles"], "hgtool_base_bundle_urls": ["http://ftp.mozilla.org/pub/mozilla.org/firefox/bundles"],
"exes": { "exes": {
"tooltool.py": "/tools/tooltool.py", "tooltool.py": "/tools/tooltool.py",
"python": "/tools/python27/bin/python2.7",
}, },
"update": { "update": {
"upload_remote_host": "update.boot2gecko.org", "upload_remote_host": "update.boot2gecko.org",
Expand Down Expand Up @@ -75,19 +73,4 @@
"purge_minsize": 15, "purge_minsize": 15,
"clobberer_url": "http://clobberer.pvt.build.mozilla.org/index.php", "clobberer_url": "http://clobberer.pvt.build.mozilla.org/index.php",
"is_automation": True, "is_automation": True,
"smoketest_config": {
"devices": {
"unagi": {
"system_fs_type": "ext4",
"system_location": "/dev/block/mmcblk0p19",
"data_fs_type": "ext4",
"data_location": "/dev/block/mmcblk0p22",
"sdcard": "/mnt/sdcard",
"sdcard_recovery": "/sdcard",
"serials": ["full_unagi"],
},
},
"public_key": os.path.abspath("build/target/product/security/testkey.x509.pem"),
"private_key": os.path.abspath("build/target/product/security/testkey.pk8"),
},
} }
17 changes: 0 additions & 17 deletions configs/b2g/releng-eng.py
Expand Up @@ -13,7 +13,6 @@
'update-source-manifest', 'update-source-manifest',
'build', 'build',
'build-symbols', 'build-symbols',
'build-update-testdata',
'make-updates', 'make-updates',
'make-socorro-json', 'make-socorro-json',
'prep-upload', 'prep-upload',
Expand All @@ -35,7 +34,6 @@
"exes": { "exes": {
"tooltool.py": "/tools/tooltool.py", "tooltool.py": "/tools/tooltool.py",
"buildbot": "/tools/buildbot/bin/buildbot", "buildbot": "/tools/buildbot/bin/buildbot",
"python": "/tools/python27/bin/python2.7",
}, },
"env": { "env": {
"CCACHE_DIR": "/builds/ccache", "CCACHE_DIR": "/builds/ccache",
Expand Down Expand Up @@ -69,19 +67,4 @@
"is_automation": True, "is_automation": True,
'variant': 'eng', 'variant': 'eng',
'target_suffix': '-eng', 'target_suffix': '-eng',
"smoketest_config": {
"devices": {
"unagi": {
"system_fs_type": "ext4",
"system_location": "/dev/block/mmcblk0p19",
"data_fs_type": "ext4",
"data_location": "/dev/block/mmcblk0p22",
"sdcard": "/mnt/sdcard",
"sdcard_recovery": "/sdcard",
"serials": ["full_unagi"],
},
},
"public_key": os.path.abspath("build/target/product/security/testkey.x509.pem"),
"private_key": os.path.abspath("build/target/product/security/testkey.pk8"),
},
} }
17 changes: 0 additions & 17 deletions configs/b2g/releng.py
Expand Up @@ -13,7 +13,6 @@
'update-source-manifest', 'update-source-manifest',
'build', 'build',
'build-symbols', 'build-symbols',
'build-update-testdata',
'make-updates', 'make-updates',
'make-socorro-json', 'make-socorro-json',
'prep-upload', 'prep-upload',
Expand All @@ -36,7 +35,6 @@
"exes": { "exes": {
"tooltool.py": "/tools/tooltool.py", "tooltool.py": "/tools/tooltool.py",
"buildbot": "/tools/buildbot/bin/buildbot", "buildbot": "/tools/buildbot/bin/buildbot",
"python": "/tools/python27/bin/python2.7",
}, },
"manifest": { "manifest": {
"upload_remote_host": "stage.mozilla.org", "upload_remote_host": "stage.mozilla.org",
Expand Down Expand Up @@ -66,19 +64,4 @@
"purge_minsize": 15, "purge_minsize": 15,
"clobberer_url": "http://clobberer.pvt.build.mozilla.org/index.php", "clobberer_url": "http://clobberer.pvt.build.mozilla.org/index.php",
"is_automation": True, "is_automation": True,
"smoketest_config": {
"devices": {
"unagi": {
"system_fs_type": "ext4",
"system_location": "/dev/block/mmcblk0p19",
"data_fs_type": "ext4",
"data_location": "/dev/block/mmcblk0p22",
"sdcard": "/mnt/sdcard",
"sdcard_recovery": "/sdcard",
"serials": ["full_unagi"],
},
},
"public_key": os.path.abspath("build/target/product/security/testkey.x509.pem"),
"private_key": os.path.abspath("build/target/product/security/testkey.pk8"),
},
} }
67 changes: 8 additions & 59 deletions scripts/b2g_build.py
Expand Up @@ -109,7 +109,7 @@ def __init__(self, require_config_file=False):
BaseScript.__init__(self, BaseScript.__init__(self,
config_options=self.config_options, config_options=self.config_options,
all_actions=[ all_actions=[
'clobber', 'clobber', # From BaseScript
'checkout-gecko', 'checkout-gecko',
# Download via tooltool repo in gecko checkout or via explicit url # Download via tooltool repo in gecko checkout or via explicit url
'download-gonk', 'download-gonk',
Expand All @@ -122,7 +122,6 @@ def __init__(self, require_config_file=False):
'build', 'build',
'build-symbols', 'build-symbols',
'make-updates', 'make-updates',
'build-update-testdata',
'prep-upload', 'prep-upload',
'upload', 'upload',
'make-update-xml', 'make-update-xml',
Expand Down Expand Up @@ -192,10 +191,9 @@ def query_abs_dirs(self):
c = self.config c = self.config
dirs = { dirs = {
'src': os.path.join(c['work_dir'], 'gecko'), 'src': os.path.join(c['work_dir'], 'gecko'),
'work_dir': abs_dirs['abs_work_dir'], 'work_dir': os.path.abspath(c['work_dir']),
'testdata_dir': os.path.join(abs_dirs['abs_work_dir'], 'testdata'), 'gaia_l10n_base_dir': os.path.join(os.path.abspath(c['work_dir']), 'gaia-l10n'),
'gaia_l10n_base_dir': os.path.join(abs_dirs['abs_work_dir'], 'gaia-l10n'), 'compare_locales_dir': os.path.join(c['base_work_dir'], 'compare-locales'),
'compare_locales_dir': os.path.join(abs_dirs['abs_work_dir'], 'compare-locales'),
} }


abs_dirs.update(dirs) abs_dirs.update(dirs)
Expand Down Expand Up @@ -331,7 +329,7 @@ def query_build_env(self):
if self.config.get('ccache'): if self.config.get('ccache'):
env['CCACHE_BASEDIR'] = dirs['work_dir'] env['CCACHE_BASEDIR'] = dirs['work_dir']
# If we get a buildid from buildbot, pass that in as MOZ_BUILD_DATE # If we get a buildid from buildbot, pass that in as MOZ_BUILD_DATE
if self.buildbot_config and 'buildid' in self.buildbot_config.get('properties', {}): if 'buildid' in self.buildbot_config.get('properties', {}):
env['MOZ_BUILD_DATE'] = self.buildbot_config['properties']['buildid'] env['MOZ_BUILD_DATE'] = self.buildbot_config['properties']['buildid']


return env return env
Expand All @@ -350,11 +348,6 @@ def clobber(self):
do_clobber = True do_clobber = True
if do_clobber: if do_clobber:
super(B2GBuild, self).clobber() super(B2GBuild, self).clobber()
else:
# Delete the upload dir so we don't upload previous stuff by accident
dirs = self.query_abs_dirs()
self.rmtree(dirs['abs_upload_dir'])
self.rmtree(dirs['testdata_dir'])
# run purge_builds / check clobberer # run purge_builds / check clobberer
self.purge_builds() self.purge_builds()
else: else:
Expand All @@ -373,7 +366,7 @@ def checkout_gecko(self):
self.mkdir_p(os.path.dirname(dirs['src'])) self.mkdir_p(os.path.dirname(dirs['src']))


repo = self.query_repo() repo = self.query_repo()
if "checkout_revision" in self.config: if self.config.has_key("checkout_revision"):
rev = self.vcs_checkout(repo=repo, dest=dirs['src'], revision=self.config["checkout_revision"]) rev = self.vcs_checkout(repo=repo, dest=dirs['src'], revision=self.config["checkout_revision"])
# in this case, self.query_revision() will be returning the "revision" that triggered the job # in this case, self.query_revision() will be returning the "revision" that triggered the job
# we know that it is not a gecko revision that did so # we know that it is not a gecko revision that did so
Expand Down Expand Up @@ -723,52 +716,6 @@ def make_updates(self):
# Sign the updates # Sign the updates
self.sign_updates() self.sign_updates()


def build_update_testdata(self):
# only run for nightlies, if target is in the smoketest_config
if not self.query_is_nightly():
self.info("Not a nightly build. Skipping...")
return
smoketest_config = self.config.get('smoketest_config')
if not smoketest_config:
self.fatal("failed to find smoketest_config")
target = self.config['target']
if target not in smoketest_config['devices']:
self.info("%s not in smoketest_config. Skipping...")
return

# create testdata for update testing
dirs = self.query_abs_dirs()
gecko_config = self.load_gecko_config()
cmd = ['./build.sh', 'fs_config']
env = self.query_build_env()

retval = self.run_mock_command(gecko_config['mock_target'], cmd, cwd=dirs['work_dir'], env=env, error_list=B2GMakefileErrorList)
if retval != 0:
self.fatal("failed to build fs_config", exit_code=2)

self.mkdir_p(dirs['testdata_dir'])
self.write_to_file(os.path.join(dirs['testdata_dir'], 'smoketest-config.json'),
json.dumps(smoketest_config))
gecko_smoketest_dir = os.path.join(dirs['work_dir'], 'gecko/testing/marionette/update-smoketests')

stage_update = os.path.join(gecko_smoketest_dir, 'stage-update.py')
python = self.query_exe("python", return_type="list")
cmd = python + [stage_update, target, dirs['testdata_dir']]
retval = self.run_mock_command(gecko_config['mock_target'], cmd, cwd=dirs['work_dir'], env=env)
if retval != 0:
self.fatal("failed to stage b2g update testdata", exit_code=2)

# copy to upload_dir
buildid = self.query_buildid()
upload_testdata_dir = os.path.join(dirs['abs_upload_dir'], 'update-testdata')
target_testdata_dir = os.path.join(dirs['testdata_dir'], target, buildid)
self.mkdir_p(upload_testdata_dir)

for f in ('flash.zip', 'flash.sh'):
self.copy_to_upload_dir(
os.path.join(target_testdata_dir, f),
os.path.join(upload_testdata_dir, f))

def sign_updates(self): def sign_updates(self):
if 'MOZ_SIGNING_SERVERS' not in os.environ: if 'MOZ_SIGNING_SERVERS' not in os.environ:
self.info("Skipping signing since no MOZ_SIGNING_SERVERS set") self.info("Skipping signing since no MOZ_SIGNING_SERVERS set")
Expand Down Expand Up @@ -800,6 +747,8 @@ def prep_upload(self):
return return


dirs = self.query_abs_dirs() dirs = self.query_abs_dirs()
# Delete the upload dir so we don't upload previous stuff by accident
self.rmtree(dirs['abs_upload_dir'])


# Copy stuff into build/upload directory # Copy stuff into build/upload directory
gecko_config = self.load_gecko_config() gecko_config = self.load_gecko_config()
Expand Down

0 comments on commit 7136501

Please sign in to comment.