620b896e2f
Steps to make this work: a) Make sure you have an android sdk checkout: => See https://github.com/dart-lang/sdk/wiki/Building-Dart-SDK-for-Android b) Building using android-toolchain crosscompiler: $ ./tools/build.py -mrelease -aarm --os=android dart_precompiled_runtime => Notice --os=android c) Testing using attached android phones: $ export PATH=$PATH:$PWD/third_party/android_tools/sdk/platform-tools $ ./tools/test.py -mrelease -aarm --system=android -cprecompiler -rdart_precompiled --use-blobs => Notice --system=android Failing tests on android can be marked in status files via: [ $compiler == precompiler && $runtime == dart_precompiled && $system == android ] R=whesse@google.com Review URL: https://codereview.chromium.org/1922163002 .
71 lines
2.3 KiB
Dart
Executable File
71 lines
2.3 KiB
Dart
Executable File
#!/usr/bin/env dart
|
|
// Copyright (c) 2013, 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.
|
|
|
|
/**
|
|
* This file is the entrypoint of the dart test suite. This suite is used
|
|
* to test:
|
|
*
|
|
* 1. the dart vm
|
|
* 2. the dart2js compiler
|
|
* 3. the static analyzer
|
|
* 4. the dart core library
|
|
* 5. other standard dart libraries (DOM bindings, ui libraries,
|
|
* io libraries etc.)
|
|
*
|
|
* This script is normally invoked by test.py. (test.py finds the dart vm
|
|
* and passses along all command line arguments to this script.)
|
|
*
|
|
* The command line args of this script are documented in
|
|
* "tools/testing/dart/test_options.dart"; they are printed
|
|
* when this script is run with "--help".
|
|
*
|
|
* The default test directory layout is documented in
|
|
* "tools/testing/dart/test_suite.dart", above
|
|
* "factory StandardTestSuite.forDirectory".
|
|
*/
|
|
|
|
library test;
|
|
|
|
import "dart:async";
|
|
import "dart:io";
|
|
import "testing/dart/test_configurations.dart";
|
|
import "testing/dart/test_options.dart";
|
|
import "testing/dart/test_progress.dart";
|
|
import "testing/dart/test_suite.dart";
|
|
import "testing/dart/utils.dart";
|
|
|
|
Future _deleteTemporaryDartDirectories() {
|
|
var completer = new Completer();
|
|
var environment = Platform.environment;
|
|
if (environment['DART_TESTING_DELETE_TEMPORARY_DIRECTORIES'] == '1') {
|
|
LeftOverTempDirPrinter.getLeftOverTemporaryDirectories().listen(
|
|
(Directory tempDirectory) {
|
|
try {
|
|
tempDirectory.deleteSync(recursive: true);
|
|
} catch (error) {
|
|
DebugLogger.error(error);
|
|
}
|
|
}, onDone: completer.complete);
|
|
} else {
|
|
completer.complete();
|
|
}
|
|
return completer.future;
|
|
}
|
|
|
|
void main(List<String> arguments) {
|
|
// This script is in [dart]/tools.
|
|
TestUtils.setDartDirUri(Platform.script.resolve('..'));
|
|
_deleteTemporaryDartDirectories().then((_) {
|
|
var optionsParser = new TestOptionsParser();
|
|
var configurations = optionsParser.parse(arguments);
|
|
if (configurations != null && configurations.length > 0) {
|
|
// All the testing is carried out asynchronously in tasks created by this
|
|
// call.
|
|
// TODO(26372): Ensure that all tasks complete before the returned future.
|
|
testConfigurations(configurations);
|
|
}
|
|
});
|
|
}
|