Switch to downloaded SDK executable, drop executables in testing/bin.

BUG=https://github.com/dart-lang/sdk/issues/24311
R=ricow@google.com

Review URL: https://codereview.chromium.org/1697203002 .
This commit is contained in:
William Hesse 2016-02-15 17:10:59 +01:00
parent 9ed0e9c97f
commit 2573093c50
16 changed files with 15 additions and 86 deletions

14
DEPS
View file

@ -292,20 +292,6 @@ hooks = [
"pattern": ".",
"action": ["python", Var("dart_root") + "/tools/gyp_dart.py"],
},
{
'name': 'checked_in_dart_binaries',
'pattern': '.',
'action': [
'download_from_google_storage',
'--no_auth',
'--no_resume',
'--bucket',
'dart-dependencies',
'--recursive',
'--directory',
Var('dart_root') + '/tools/testing/bin',
],
},
{
'name': 'd8_testing_binaries',
'pattern': '.',

View file

@ -47,7 +47,7 @@ def cross_compiling_builder(arch, mode):
with bot.BuildStep('Create build tarball'):
run(['tar', '-cjf', tarball, '--exclude=**/obj',
'--exclude=**/obj.host', '--exclude=**/obj.target',
'--exclude=**/*analyzer*', 'out/', 'tools/testing/bin/'])
'--exclude=**/*analyzer*', 'out/'])
with bot.BuildStep('Upload build tarball'):
uri = "%s/%s" % (GCS_BUCKET, tarball)

View file

@ -40,8 +40,7 @@ verbose = False
versiondir = ''
# Ignore Git/SVN files, checked-in binaries, backup files, etc..
ignoredPaths = ['tools/testing/bin',
'tools/sdks',
ignoredPaths = ['tools/sdks',
'third_party/7zip', 'third_party/android_tools',
'third_party/clang', 'third_party/d8',
'third_party/firefox_jsshell']

View file

@ -230,20 +230,6 @@ hooks.append({
"f=open('src/build/util/LASTCHANGE.blink','w'); f.write('LASTCHANGE=" +
Var('webkit_revision') + "\\n')" ],
})
hooks.append({
"name": "checked_in_dart_binaries",
"pattern": ".",
"action": [
"download_from_google_storage",
"--no_auth",
"--no_resume",
"--bucket",
"dart-dependencies",
"--recursive",
"--directory",
"src/dart/tools/testing/bin",
],
})
hooks.append({
"name": "checked_in_dart_sdks",
"pattern": ".",

View file

@ -148,7 +148,7 @@ def start_test_server(port, build_directory):
print('Browse tests at '
'\033[94mhttp://localhost:%d/root_build/generated_tests/\033[0m' % port)
return call([
utils.DartBinary(),
utils.CheckedInSdkExecutable(),
os.path.join('tools', 'testing', 'dart', 'http_server.dart'),
'--port=%d' % port,
'--crossOriginPort=%d' % (port + 1),

View file

@ -16,7 +16,8 @@ def Main():
tools_dir = os.path.dirname(os.path.realpath(__file__))
dart_script_name = 'test.dart'
dart_test_script = string.join([tools_dir, dart_script_name], os.sep)
command = [utils.DartBinary(), '--checked', dart_test_script] + args
command = [utils.CheckedInSdkExecutable(),
'--checked', dart_test_script] + args
exit_code = subprocess.call(command)
utils.DiagnoseExitCode(exit_code, command)
return exit_code

View file

@ -1 +0,0 @@
5246a42926c8d5c2ac785c952b76b746270c9484

View file

@ -1 +0,0 @@
7ab189bca5c5cf2997b9ab5770a5b418cd4fa5b1

View file

@ -1 +0,0 @@
701c1f2bda5c7fa3cc0f044d7515237bdc2cc163

View file

@ -1 +0,0 @@
ecefe6ba96b8da00d171e199b2801982f98cc78d

View file

@ -1 +0,0 @@
c1394c6a589c47f7a6a1315eb1f9885d66852d67

View file

@ -11,7 +11,7 @@
* co19.
*
* Usage:
* [: ./tools/testing/bin/$OS/dart tools/testing/dart/co19_test.dart :]
* [: dart tools/testing/dart/co19_test.dart :]
*/
library co19_test;

View file

@ -172,7 +172,7 @@ class TestingServers {
}
String httpServerCommandline() {
var dart = TestUtils.dartTestExecutable.toNativePath();
var dart = Platform.resolvedExecutable;
var dartDir = TestUtils.dartDir;
var script = dartDir.join(new Path("tools/testing/dart/http_server.dart"));
var buildDirectory = _buildDirectory.toNativePath();

View file

@ -292,7 +292,7 @@ class BrowserTestCommand extends Command {
retry == other.retry;
String get reproductionCommand {
var parts = [TestUtils.dartTestExecutable.toString(),
var parts = [Platform.resolvedExecutable,
'tools/testing/dart/launch_browser.dart',
browser,
url];

View file

@ -2386,19 +2386,6 @@ class TestUtils {
return normal;
}
/**
* Returns the path to the dart binary checked into the repo, used for
* bootstrapping test.dart.
*/
static Path get dartTestExecutable {
var path = '$dartDir/tools/testing/bin/'
'${Platform.operatingSystem}/dart';
if (Platform.operatingSystem == 'windows') {
path = '$path.exe';
}
return new Path(path);
}
/**
* Gets extra options under [key] passed to the testing script.
*/

View file

@ -573,38 +573,6 @@ def ExecuteCommand(cmd):
return pipe.returncode, output
def DartBinary():
# TODO(24311): Replace all uses of this with CheckedInSdk[Fix]Executable().
tools_dir = os.path.dirname(os.path.realpath(__file__))
dart_binary_prefix = os.path.join(tools_dir, 'testing', 'bin')
if IsWindows():
return os.path.join(dart_binary_prefix, 'windows', 'dart.exe')
else:
arch = GuessArchitecture()
system = GuessOS()
if arch == 'armv5te':
# TODO(zra): This binary does not exist, yet. Check one in once we have
# sufficient stability.
return os.path.join(dart_binary_prefix, system, 'dart-armv5te')
elif arch == 'armv6':
# TODO(zra): Ditto.
return os.path.join(dart_binary_prefix, system, 'dart-armv6')
elif arch == 'arm':
return os.path.join(dart_binary_prefix, system, 'dart-arm')
elif arch == 'arm64':
return os.path.join(dart_binary_prefix, system, 'dart-arm64')
elif arch == 'mips':
return os.path.join(dart_binary_prefix, system, 'dart-mips')
else:
return os.path.join(dart_binary_prefix, system, 'dart')
def DartSdkBinary():
tools_dir = os.path.dirname(os.path.realpath(__file__))
dart_binary_prefix = os.path.join(tools_dir, '..', 'sdk' , 'bin')
return os.path.join(dart_binary_prefix, 'dart')
# The checked-in SDKs are documented at
# https://github.com/dart-lang/sdk/wiki/The-checked-in-SDK-in-tools
def CheckedInSdkPath():
@ -636,6 +604,13 @@ def CheckedInSdkExecutable():
name = 'dart-arm'
elif arch == 'arm64':
name = 'dart-arm64'
elif arch == 'armv5te':
# TODO(zra): This binary does not exist, yet. Check one in once we have
# sufficient stability.
name = 'dart-armv5te'
elif arch == 'armv6':
# TODO(zra): Ditto.
name = 'dart-armv6'
return os.path.join(CheckedInSdkPath(), 'bin', name)