mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 06:20:13 +00:00
Fix some issues with buildbot recipe change.
BUG= R=kustermann@google.com Review-Url: https://codereview.chromium.org/2903603002 .
This commit is contained in:
parent
a4adc426e1
commit
737a55cc63
4 changed files with 15 additions and 46 deletions
|
@ -145,9 +145,8 @@ class GCSNamer(object):
|
|||
def sdk_directory(self, revision):
|
||||
return self._variant_directory('sdk', revision)
|
||||
|
||||
def linux_packages_directory(self, revision, linux_system):
|
||||
return '/'.join([self._variant_directory('linux_packages', revision),
|
||||
linux_system])
|
||||
def linux_packages_directory(self, revision):
|
||||
return '/'.join([self._variant_directory('linux_packages', revision)])
|
||||
|
||||
def src_directory(self, revision):
|
||||
return self._variant_directory('src', revision)
|
||||
|
|
|
@ -21,7 +21,7 @@ import bot_utils
|
|||
utils = bot_utils.GetUtils()
|
||||
|
||||
HOST_OS = utils.GuessOS()
|
||||
SRC_BUILDER = r'linux-distribution-support-(debian_wheezy|ubuntu_precise)'
|
||||
SRC_BUILDER = r'debianpackage-linux'
|
||||
|
||||
def SrcConfig(name, is_buildbot):
|
||||
"""Returns info for the current buildbot based on the name of the builder.
|
||||
|
@ -33,10 +33,9 @@ def SrcConfig(name, is_buildbot):
|
|||
src_pattern = re.match(SRC_BUILDER, name)
|
||||
if not src_pattern:
|
||||
return None
|
||||
return bot.BuildInfo('none', 'none', 'release', 'linux',
|
||||
builder_tag=src_pattern.group(1))
|
||||
return bot.BuildInfo('none', 'none', 'release', 'linux')
|
||||
|
||||
def ArchiveArtifacts(tarfile, builddir, channel, linux_system):
|
||||
def ArchiveArtifacts(tarfile, builddir, channel):
|
||||
namer = bot_utils.GCSNamer(channel=channel)
|
||||
gsutil = bot_utils.GSUtil()
|
||||
revision = utils.GetArchiveVersion()
|
||||
|
@ -50,7 +49,7 @@ def ArchiveArtifacts(tarfile, builddir, channel, linux_system):
|
|||
# We expect a flat structure, not subdirectories
|
||||
assert(os.path.isfile(full_path))
|
||||
if full_path != tarfile:
|
||||
package_dir = namer.linux_packages_directory(revision, linux_system)
|
||||
package_dir = namer.linux_packages_directory(revision)
|
||||
remote_file = '/'.join([package_dir,
|
||||
os.path.basename(entry)])
|
||||
gsutil.upload(full_path, remote_file, public=True)
|
||||
|
@ -108,23 +107,16 @@ def SrcSteps(build_info):
|
|||
tarfile = os.path.join(builddir, tarfilename)
|
||||
|
||||
with bot.BuildStep('Validating linux system'):
|
||||
print 'Validating that we are on %s' % build_info.builder_tag
|
||||
print 'Validating that we are on debian jessie'
|
||||
args = ['cat', '/etc/os-release']
|
||||
(stdout, stderr, exitcode) = bot_utils.run(args)
|
||||
if exitcode != 0:
|
||||
print "Could not find linux system, exiting"
|
||||
sys.exit(1)
|
||||
|
||||
if build_info.builder_tag == "debian_wheezy":
|
||||
if not "jessie" in stdout:
|
||||
print "Trying to build debian bits on a non debian system"
|
||||
print "You can't fix this, please contact whesse@"
|
||||
sys.exit(1)
|
||||
if build_info.builder_tag == "ubuntu_precise":
|
||||
if not "precise" in stdout:
|
||||
print "Trying to build ubuntu bits on a non ubuntu system"
|
||||
print "You can't fix this, please contact whesse@"
|
||||
sys.exit(1)
|
||||
if not "jessie" in stdout:
|
||||
print "Trying to build debian bits but not on debian Jessie"
|
||||
print "You can't fix this, please contact whesse@"
|
||||
sys.exit(1)
|
||||
|
||||
with bot.BuildStep('Create src tarball'):
|
||||
print 'Building src tarball'
|
||||
|
@ -154,9 +146,7 @@ def SrcSteps(build_info):
|
|||
|
||||
# We currently can't run the testing script on wheezy since the checked in
|
||||
# binary is built on precise, see issue 18742
|
||||
if (build_info.builder_tag == 'ubuntu_precise'):
|
||||
Run([sys.executable, './tools/test.py', '-ax64',
|
||||
'--mode=release', 'standalone'])
|
||||
# TODO(18742): Run './tools/test.py' '-mrelease' 'standalone'
|
||||
|
||||
# Sanity check dart2js and the analyzer against a hello world program
|
||||
with utils.TempDir() as temp_dir:
|
||||
|
@ -175,7 +165,7 @@ def SrcSteps(build_info):
|
|||
bot_name, _ = bot.GetBotName()
|
||||
channel = bot_utils.GetChannelFromName(bot_name)
|
||||
if channel != bot_utils.Channel.BLEEDING_EDGE:
|
||||
ArchiveArtifacts(tarfile, builddir, channel, build_info.builder_tag)
|
||||
ArchiveArtifacts(tarfile, builddir, channel)
|
||||
else:
|
||||
print 'Not uploading artifacts on bleeding edge'
|
||||
|
||||
|
|
|
@ -190,25 +190,6 @@ hooks[0:0] = [{
|
|||
"action": ["python", "src/dart/tools/dartium/generate_dart_vm_version.py"],
|
||||
}]
|
||||
|
||||
hooks.append({
|
||||
# Set the revision for a lazily downloaded reference build of chromium,
|
||||
# with which to run perf tests.
|
||||
'name': 'set_reference_build',
|
||||
'pattern': '.',
|
||||
'action': ['python',
|
||||
'src/dart/tools/bots/set_reference_build_revision.py',
|
||||
Var('chromium_base_revision')],
|
||||
})
|
||||
#hooks.append({
|
||||
# Peg the blink version number in LASTCHANGE.blink to be the upstream
|
||||
# webkit_revision number so that chrome remote devtools pulls assets from
|
||||
# the right place.
|
||||
# "name": "lastchange",
|
||||
# "pattern": ".",
|
||||
# "action": ["python", "-c",
|
||||
# "f=open('src/build/util/LASTCHANGE.blink','w'); f.write('LASTCHANGE=" +
|
||||
# Var('webkit_revision') + "\\n')" ],
|
||||
#})
|
||||
hooks.append({
|
||||
"name": "checked_in_dart_sdks",
|
||||
"pattern": ".",
|
||||
|
|
|
@ -143,9 +143,8 @@ def _PromoteDartArchiveBuild(channel, revision):
|
|||
Gsutil(['-m', 'cp', '-a', 'public-read', '-R', from_loc, to_loc])
|
||||
|
||||
# Copy wheezy linux deb and src packages.
|
||||
from_loc = raw_namer.linux_packages_directory(revision, 'debian_wheezy')
|
||||
to_loc = release_namer.linux_packages_directory(to_revision,
|
||||
'debian_wheezy')
|
||||
from_loc = raw_namer.linux_packages_directory(revision)
|
||||
to_loc = release_namer.linux_packages_directory(to_revision)
|
||||
remove_gs_directory(to_loc)
|
||||
Gsutil(['-m', 'cp', '-a', 'public-read', '-R', from_loc, to_loc])
|
||||
|
||||
|
|
Loading…
Reference in a new issue