mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
Switch over testing pub seperately from the the normal packages
This will call a new test script that Natalie will fill in the blanks of for pub testing. This also moves pub from third_party/pkg_tested into third_party/pkg. The corresponding changes to the buildbot is here: http://src.chromium.org/viewvc/chrome?revision=295555&view=revision R=nweiz@google.com, whesse@google.com BUG= Review URL: https://codereview.chromium.org//1166093002.
This commit is contained in:
parent
25620e2e59
commit
f3c6339206
4
DEPS
4
DEPS
|
@ -82,7 +82,7 @@ vars = {
|
||||||
"ply_rev": "@604b32590ffad5cbb82e4afef1d305512d06ae93",
|
"ply_rev": "@604b32590ffad5cbb82e4afef1d305512d06ae93",
|
||||||
"plugin_tag": "@0.1.0",
|
"plugin_tag": "@0.1.0",
|
||||||
"pool_rev": "@22e12aeb16ad0b626900dbe79e4a25391ddfb28c",
|
"pool_rev": "@22e12aeb16ad0b626900dbe79e4a25391ddfb28c",
|
||||||
"pub_rev": "@68308887177ef3b78fdd52f068e4eaefe1b17e07",
|
"pub_rev": "@9d707158fedc86fc2b02f62cdfe804902b098d9d",
|
||||||
"pub_semver_tag": "@1.2.1",
|
"pub_semver_tag": "@1.2.1",
|
||||||
"scheduled_test_tag": "@0.11.8+1",
|
"scheduled_test_tag": "@0.11.8+1",
|
||||||
"shelf_rev": "@1e87b79b21ac5e6fa2f93576d6c06eaa65285ef4",
|
"shelf_rev": "@1e87b79b21ac5e6fa2f93576d6c06eaa65285ef4",
|
||||||
|
@ -240,7 +240,7 @@ deps = {
|
||||||
(Var("github_mirror") % "pool") + Var("pool_rev"),
|
(Var("github_mirror") % "pool") + Var("pool_rev"),
|
||||||
Var("dart_root") + "/third_party/pkg/pub_semver":
|
Var("dart_root") + "/third_party/pkg/pub_semver":
|
||||||
(Var("github_mirror") % "pub_semver") + Var("pub_semver_tag"),
|
(Var("github_mirror") % "pub_semver") + Var("pub_semver_tag"),
|
||||||
Var("dart_root") + "/third_party/pkg_tested/pub":
|
Var("dart_root") + "/third_party/pkg/pub":
|
||||||
("https://github.com/dart-lang/pub.git") + Var("pub_rev"),
|
("https://github.com/dart-lang/pub.git") + Var("pub_rev"),
|
||||||
Var("dart_root") + "/third_party/pkg/scheduled_test":
|
Var("dart_root") + "/third_party/pkg/scheduled_test":
|
||||||
(Var("github_mirror") % "scheduled_test") +
|
(Var("github_mirror") % "scheduled_test") +
|
||||||
|
|
|
@ -79,7 +79,9 @@ def main():
|
||||||
return status
|
return status
|
||||||
|
|
||||||
name = GetName()
|
name = GetName()
|
||||||
if name.startswith('pub-'):
|
if name.startswith('pkg-'):
|
||||||
|
status = ProcessBot(name, 'pkg')
|
||||||
|
elif name.startswith('pub-'):
|
||||||
status = ProcessBot(name, 'pub')
|
status = ProcessBot(name, 'pub')
|
||||||
elif name.startswith('vm-android'):
|
elif name.startswith('vm-android'):
|
||||||
status = ProcessBot(name, 'android')
|
status = ProcessBot(name, 'android')
|
||||||
|
|
|
@ -53,5 +53,5 @@ DART="$BUILD_DIR/dart-sdk/bin/dart"
|
||||||
PACKAGES_DIR="$BUILD_DIR/packages/"
|
PACKAGES_DIR="$BUILD_DIR/packages/"
|
||||||
|
|
||||||
# Run pub.
|
# Run pub.
|
||||||
PUB="$SDK_DIR/../third_party/pkg_tested/pub/bin/pub.dart"
|
PUB="$SDK_DIR/../third_party/pkg/pub/bin/pub.dart"
|
||||||
exec "$DART" "${VM_OPTIONS[@]}" "--package-root=$PACKAGES_DIR" "$PUB" "$@"
|
exec "$DART" "${VM_OPTIONS[@]}" "--package-root=$PACKAGES_DIR" "$PUB" "$@"
|
||||||
|
|
|
@ -35,7 +35,7 @@ set PACKAGES_DIR=%BUILD_DIR%\packages
|
||||||
set DART=%BUILD_DIR%\dart-sdk\bin\dart
|
set DART=%BUILD_DIR%\dart-sdk\bin\dart
|
||||||
|
|
||||||
rem Run pub.
|
rem Run pub.
|
||||||
set PUB="%SDK_DIR%\..\third_party\pkg_tested\pub\bin\pub.dart"
|
set PUB="%SDK_DIR%\..\third_party\pkg\pub\bin\pub.dart"
|
||||||
"%DART%" %VM_OPTIONS% --package-root="%PACKAGES_DIR%" "%PUB%" %*
|
"%DART%" %VM_OPTIONS% --package-root="%PACKAGES_DIR%" "%PUB%" %*
|
||||||
|
|
||||||
endlocal
|
endlocal
|
||||||
|
|
83
tools/bots/pkg.py
Normal file
83
tools/bots/pkg.py
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
|
||||||
|
# for details. All rights reserved. Use of this source code is governed by a
|
||||||
|
# BSD-style license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
"""
|
||||||
|
Pkg buildbot steps.
|
||||||
|
|
||||||
|
Runs tests for packages that are hosted in the main Dart repo and in
|
||||||
|
third_party/pkg_tested.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import re
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import bot
|
||||||
|
|
||||||
|
PKG_BUILDER = r'pkg-(linux|mac|win)(-(russian))?(-(debug))?'
|
||||||
|
|
||||||
|
def PkgConfig(name, is_buildbot):
|
||||||
|
"""Returns info for the current buildbot based on the name of the builder.
|
||||||
|
|
||||||
|
Currently, this is just:
|
||||||
|
- mode: "debug", "release"
|
||||||
|
- system: "linux", "mac", or "win"
|
||||||
|
"""
|
||||||
|
pkg_pattern = re.match(PKG_BUILDER, name)
|
||||||
|
if not pkg_pattern:
|
||||||
|
return None
|
||||||
|
|
||||||
|
system = pkg_pattern.group(1)
|
||||||
|
locale = pkg_pattern.group(3)
|
||||||
|
mode = pkg_pattern.group(5) or 'release'
|
||||||
|
if system == 'win': system = 'windows'
|
||||||
|
|
||||||
|
return bot.BuildInfo('none', 'vm', mode, system, checked=True,
|
||||||
|
builder_tag=locale)
|
||||||
|
|
||||||
|
def PkgSteps(build_info):
|
||||||
|
with bot.BuildStep('Build package-root'):
|
||||||
|
args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode,
|
||||||
|
'packages']
|
||||||
|
print 'Building package-root: %s' % (' '.join(args))
|
||||||
|
bot.RunProcess(args)
|
||||||
|
|
||||||
|
common_args = ['--write-test-outcome-log']
|
||||||
|
if build_info.builder_tag:
|
||||||
|
common_args.append('--builder-tag=%s' % build_info.builder_tag)
|
||||||
|
|
||||||
|
# There are a number of big/integration tests in pkg, run with bigger timeout
|
||||||
|
common_args.append('--timeout=120')
|
||||||
|
# We have some unreproducible vm crashes on these bots
|
||||||
|
common_args.append('--copy-coredumps')
|
||||||
|
|
||||||
|
# We are seeing issues with pub get calls on the windows bots.
|
||||||
|
# Experiment with not running concurrent calls.
|
||||||
|
if build_info.system == 'windows':
|
||||||
|
common_args.append('-j1')
|
||||||
|
if build_info.mode == 'release':
|
||||||
|
bot.RunTest('pkg ', build_info,
|
||||||
|
common_args + ['pkg', 'docs', 'pkg_tested'],
|
||||||
|
swallow_error=True)
|
||||||
|
else:
|
||||||
|
# Pkg tests currently have a lot of timeouts when run in debug mode.
|
||||||
|
# See issue 18479
|
||||||
|
bot.RunTest('pkg', build_info, common_args + ['pkg', 'docs'],
|
||||||
|
swallow_error=True)
|
||||||
|
|
||||||
|
if build_info.mode == 'release':
|
||||||
|
pkgbuild_build_info = bot.BuildInfo('none', 'vm', build_info.mode,
|
||||||
|
build_info.system, checked=False)
|
||||||
|
bot.RunTest('pkgbuild_repo_pkgs', pkgbuild_build_info,
|
||||||
|
common_args + ['--append_logs', '--use-repository-packages',
|
||||||
|
'pkgbuild'],
|
||||||
|
swallow_error=True)
|
||||||
|
|
||||||
|
public_args = (common_args +
|
||||||
|
['--append_logs', '--use-public-packages', 'pkgbuild'])
|
||||||
|
bot.RunTest('pkgbuild_public_pkgs', pkgbuild_build_info, public_args)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
bot.RunBot(PkgConfig, PkgSteps)
|
|
@ -10,73 +10,66 @@ Pub buildbot steps.
|
||||||
Runs tests for pub and the pub packages that are hosted in the main Dart repo.
|
Runs tests for pub and the pub packages that are hosted in the main Dart repo.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
import re
|
import re
|
||||||
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import bot
|
import bot
|
||||||
|
import bot_utils
|
||||||
|
|
||||||
PUB_BUILDER = r'pub-(linux|mac|win)(-(russian))?(-(debug))?'
|
utils = bot_utils.GetUtils()
|
||||||
|
|
||||||
|
BUILD_OS = utils.GuessOS()
|
||||||
|
|
||||||
|
PUB_BUILDER = r'pub-(linux|mac|win)'
|
||||||
|
|
||||||
def PubConfig(name, is_buildbot):
|
def PubConfig(name, is_buildbot):
|
||||||
"""Returns info for the current buildbot based on the name of the builder.
|
"""Returns info for the current buildbot based on the name of the builder.
|
||||||
|
|
||||||
Currently, this is just:
|
Currently, this is just:
|
||||||
- mode: "debug", "release"
|
- mode: always release, we don't run pub in debug mode
|
||||||
- system: "linux", "mac", or "win"
|
- system: "linux", "mac", or "win"
|
||||||
|
- checked: always true
|
||||||
"""
|
"""
|
||||||
pub_pattern = re.match(PUB_BUILDER, name)
|
pub_pattern = re.match(PUB_BUILDER, name)
|
||||||
if not pub_pattern:
|
if not pub_pattern:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
system = pub_pattern.group(1)
|
system = pub_pattern.group(1)
|
||||||
locale = pub_pattern.group(3)
|
mode = 'release'
|
||||||
mode = pub_pattern.group(5) or 'release'
|
|
||||||
if system == 'win': system = 'windows'
|
if system == 'win': system = 'windows'
|
||||||
|
|
||||||
return bot.BuildInfo('none', 'vm', mode, system, checked=True,
|
return bot.BuildInfo('none', 'vm', mode, system, checked=True)
|
||||||
builder_tag=locale)
|
|
||||||
|
def Run(command):
|
||||||
|
print "Running %s" % ' '.join(command)
|
||||||
|
return bot.RunProcess(command)
|
||||||
|
|
||||||
def PubSteps(build_info):
|
def PubSteps(build_info):
|
||||||
with bot.BuildStep('Build package-root'):
|
sdk_bin = os.path.join(
|
||||||
args = [sys.executable, './tools/build.py', '--mode=' + build_info.mode,
|
bot_utils.DART_DIR,
|
||||||
'packages']
|
utils.GetBuildSdkBin(BUILD_OS, build_info.mode, build_info.arch))
|
||||||
print 'Building package-root: %s' % (' '.join(args))
|
pub_script_name = 'pub.bat' if build_info.system == 'windows' else 'pub'
|
||||||
bot.RunProcess(args)
|
pub_bin = os.path.join(sdk_bin, pub_script_name)
|
||||||
|
|
||||||
common_args = ['--write-test-outcome-log']
|
pub_copy = os.path.join(utils.GetBuildRoot('linux'), 'pub_copy')
|
||||||
if build_info.builder_tag:
|
pub_location = os.path.join('third_party', 'pkg', 'pub')
|
||||||
common_args.append('--builder-tag=%s' % build_info.builder_tag)
|
|
||||||
|
|
||||||
# There are a number of big/integration tests in pkg, run with bigger timeout
|
with bot.BuildStep('Make copy of pub for testing'):
|
||||||
common_args.append('--timeout=120')
|
print 'Removing old copy %s' % pub_copy
|
||||||
# We have some unreproducible vm crashes on these bots
|
shutil.rmtree(pub_copy, ignore_errors=True)
|
||||||
common_args.append('--copy-coredumps')
|
print 'Copying %s to %s' % (pub_location, pub_copy)
|
||||||
|
shutil.copytree(pub_location, pub_copy)
|
||||||
|
|
||||||
if build_info.system == 'windows':
|
# TODO(nweiz): add logic for testing pub.
|
||||||
common_args.append('-j1')
|
with bot.BuildStep('Doing the magic ls'):
|
||||||
if build_info.mode == 'release':
|
with utils.ChangedWorkingDirectory(pub_copy):
|
||||||
bot.RunTest('pub and pkg ', build_info,
|
Run(['ls', '-l'])
|
||||||
common_args + ['pub', 'pkg', 'docs', 'pkg_tested'],
|
|
||||||
swallow_error=True)
|
|
||||||
else:
|
|
||||||
# Pub tests currently have a lot of timeouts when run in debug mode.
|
|
||||||
# See issue 18479
|
|
||||||
bot.RunTest('pub and pkg', build_info, common_args + ['pkg', 'docs'],
|
|
||||||
swallow_error=True)
|
|
||||||
|
|
||||||
if build_info.mode == 'release':
|
with bot.BuildStep('Running pub'):
|
||||||
pkgbuild_build_info = bot.BuildInfo('none', 'vm', build_info.mode,
|
Run([pub_bin, '--version'])
|
||||||
build_info.system, checked=False)
|
|
||||||
bot.RunTest('pkgbuild_repo_pkgs', pkgbuild_build_info,
|
|
||||||
common_args + ['--append_logs', '--use-repository-packages',
|
|
||||||
'pkgbuild'],
|
|
||||||
swallow_error=True)
|
|
||||||
|
|
||||||
# We are seeing issues with pub get calls on the windows bots.
|
|
||||||
# Experiment with not running concurrent calls.
|
|
||||||
public_args = (common_args +
|
|
||||||
['--append_logs', '--use-public-packages', 'pkgbuild'])
|
|
||||||
bot.RunTest('pkgbuild_public_pkgs', pkgbuild_build_info, public_args)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
bot.RunBot(PubConfig, PubSteps)
|
bot.RunBot(PubConfig, PubSteps)
|
||||||
|
|
|
@ -229,7 +229,7 @@ def Main():
|
||||||
|
|
||||||
RESOURCE = join(SDK_tmp, 'lib', '_internal', 'pub', 'asset')
|
RESOURCE = join(SDK_tmp, 'lib', '_internal', 'pub', 'asset')
|
||||||
os.makedirs(os.path.dirname(RESOURCE))
|
os.makedirs(os.path.dirname(RESOURCE))
|
||||||
copytree(join(HOME, 'third_party', 'pkg_tested', 'pub', 'lib', 'src',
|
copytree(join(HOME, 'third_party', 'pkg', 'pub', 'lib', 'src',
|
||||||
'asset'),
|
'asset'),
|
||||||
join(RESOURCE),
|
join(RESOURCE),
|
||||||
ignore=ignore_patterns('.svn'))
|
ignore=ignore_patterns('.svn'))
|
||||||
|
|
|
@ -34,7 +34,7 @@ vars.update({
|
||||||
"path_rev": "@b657c0854d1cf41c014986fa9d2321f1173df805",
|
"path_rev": "@b657c0854d1cf41c014986fa9d2321f1173df805",
|
||||||
"plugin_tag": "@0.1.0",
|
"plugin_tag": "@0.1.0",
|
||||||
"pool_rev": "@22e12aeb16ad0b626900dbe79e4a25391ddfb28c",
|
"pool_rev": "@22e12aeb16ad0b626900dbe79e4a25391ddfb28c",
|
||||||
"pub_rev": "@6f2a1b90b8210a85a38aab1af479c047681c29e6",
|
"pub_rev": "@9d707158fedc86fc2b02f62cdfe804902b098d9d",
|
||||||
"pub_semver_tag": "@1.2.0",
|
"pub_semver_tag": "@1.2.0",
|
||||||
"shelf_rev": "@1e87b79b21ac5e6fa2f93576d6c06eaa65285ef4",
|
"shelf_rev": "@1e87b79b21ac5e6fa2f93576d6c06eaa65285ef4",
|
||||||
"shelf_web_socket_rev": "@ff170cec2c0e4e5722cdf47c557be63b5035a602",
|
"shelf_web_socket_rev": "@ff170cec2c0e4e5722cdf47c557be63b5035a602",
|
||||||
|
@ -109,7 +109,7 @@ deps.update({
|
||||||
"https://github.com/dart-lang/plugin.git" + Var("plugin_tag"),
|
"https://github.com/dart-lang/plugin.git" + Var("plugin_tag"),
|
||||||
"src/dart/third_party/pkg/pool":
|
"src/dart/third_party/pkg/pool":
|
||||||
"https://github.com/dart-lang/pool.git" + Var("pool_rev"),
|
"https://github.com/dart-lang/pool.git" + Var("pool_rev"),
|
||||||
"src/dart/third_party/pkg_tested/pub":
|
"src/dart/third_party/pkg/pub":
|
||||||
"https://github.com/dart-lang/pub.git" + Var("pub_rev"),
|
"https://github.com/dart-lang/pub.git" + Var("pub_rev"),
|
||||||
"src/dart/third_party/pkg/pub_semver":
|
"src/dart/third_party/pkg/pub_semver":
|
||||||
"https://github.com/dart-lang/pub_semver.git" + Var("pub_semver_tag"),
|
"https://github.com/dart-lang/pub_semver.git" + Var("pub_semver_tag"),
|
||||||
|
|
|
@ -12,7 +12,7 @@ import sys
|
||||||
|
|
||||||
SCRIPT_DIR = os.path.dirname(sys.argv[0])
|
SCRIPT_DIR = os.path.dirname(sys.argv[0])
|
||||||
DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
|
DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
|
||||||
PUB_PATH = os.path.join(DART_ROOT, 'third_party/pkg_tested/pub/bin/pub.dart')
|
PUB_PATH = os.path.join(DART_ROOT, 'third_party/pkg/pub/bin/pub.dart')
|
||||||
CANARY_PATH = os.path.join(DART_ROOT, 'tools', 'canary.dart')
|
CANARY_PATH = os.path.join(DART_ROOT, 'tools', 'canary.dart')
|
||||||
|
|
||||||
usage = """run_pub.py --package-root=<package root>"""
|
usage = """run_pub.py --package-root=<package root>"""
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
|
'<(PRODUCT_DIR)/<(EXECUTABLE_PREFIX)dart<(EXECUTABLE_SUFFIX)',
|
||||||
'--package-root=<(PRODUCT_DIR)/packages/',
|
'--package-root=<(PRODUCT_DIR)/packages/',
|
||||||
'--snapshot=<(SHARED_INTERMEDIATE_DIR)/pub.dart.snapshot',
|
'--snapshot=<(SHARED_INTERMEDIATE_DIR)/pub.dart.snapshot',
|
||||||
'../../third_party/pkg_tested/pub/bin/pub.dart',
|
'../../third_party/pkg/pub/bin/pub.dart',
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue