mirror of
https://github.com/dart-lang/sdk
synced 2024-09-04 16:03:44 +00:00
Use package:testing for tools/gardening
R=ahe@google.com Review-Url: https://codereview.chromium.org/2999043003 .
This commit is contained in:
parent
6a958b3edb
commit
f1b3a59da3
5
pkg/testing/pubspec.yaml
Normal file
5
pkg/testing/pubspec.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
# This pubspec is currently mainly used to make it easier to develop by making
|
||||
# it a package.
|
||||
name: testing
|
||||
#version: do-not-upload
|
||||
dependencies:
|
9
tools/gardening/analysis_options.yaml
Normal file
9
tools/gardening/analysis_options.yaml
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Copyright (c) 2017, 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.
|
||||
|
||||
analyzer:
|
||||
strong-mode: true
|
||||
errors:
|
||||
# Allow having TODOs in the code
|
||||
todo: ignore
|
|
@ -13,7 +13,7 @@ import 'summary.dart' as summary;
|
|||
|
||||
typedef Future MainFunction(List<String> args);
|
||||
|
||||
help(List<String> args) async {
|
||||
Future help(List<String> args) async {
|
||||
if (args.length == 1 && args[0] == "--help") {
|
||||
print("This help");
|
||||
return null;
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
///
|
||||
/// Use this to detect flakiness of failures, especially timeouts.
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:args/args.dart';
|
||||
|
@ -26,7 +27,7 @@ void help(ArgParser argParser) {
|
|||
print(argParser.usage);
|
||||
}
|
||||
|
||||
main(List<String> args) async {
|
||||
Future main(List<String> args) async {
|
||||
ArgParser argParser = createArgParser();
|
||||
argParser.addOption("run-count",
|
||||
defaultsTo: "10", help: "How many previous runs should be fetched");
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
/// The results are currently pulled from the second to last build since the
|
||||
/// last build might not have completed yet.
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:math' hide log;
|
||||
import 'dart:io';
|
||||
|
||||
|
@ -27,7 +28,7 @@ void help(ArgParser argParser) {
|
|||
print(argParser.usage);
|
||||
}
|
||||
|
||||
main(List<String> args) async {
|
||||
Future main(List<String> args) async {
|
||||
ArgParser argParser = createArgParser();
|
||||
argParser.addOption('group',
|
||||
help: "Restricts the build groups\n"
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
// Example: `bin/find_shard.dart precomp-linux-debug-x64-be`
|
||||
// prints `vm-precomp(5): precomp-linux-debug-x64-be`.
|
||||
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'package:args/args.dart';
|
||||
import 'package:gardening/src/shard_data.dart';
|
||||
|
@ -54,7 +55,7 @@ bool shard_enabled(String shard) {
|
|||
return true;
|
||||
}
|
||||
|
||||
main(List<String> args) async {
|
||||
Future main(List<String> args) async {
|
||||
ArgParser argParser = createArgParser();
|
||||
argParser.addFlag("include-dev",
|
||||
abbr: "d",
|
||||
|
|
|
@ -21,7 +21,7 @@ void help(ArgParser argParser) {
|
|||
print(argParser.usage);
|
||||
}
|
||||
|
||||
main(List<String> args) async {
|
||||
Future main(List<String> args) async {
|
||||
ArgParser argParser = createArgParser();
|
||||
ArgResults argResults = argParser.parse(args);
|
||||
processArgResults(argResults);
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// 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.
|
||||
|
||||
import 'dart:async';
|
||||
import 'package:args/args.dart';
|
||||
import 'package:gardening/src/bot.dart';
|
||||
import 'package:gardening/src/buildbot_data.dart';
|
||||
|
@ -16,7 +17,7 @@ void help(ArgParser argParser) {
|
|||
print(argParser.usage);
|
||||
}
|
||||
|
||||
main(List<String> args) async {
|
||||
Future main(List<String> args) async {
|
||||
ArgParser argParser = createArgParser();
|
||||
ArgResults argResults = argParser.parse(args);
|
||||
processArgResults(argResults);
|
||||
|
|
|
@ -5,4 +5,6 @@ name: gardening
|
|||
dependencies:
|
||||
args:
|
||||
expect:
|
||||
path: ../../pkg/expect/
|
||||
path: ../../pkg/expect/
|
||||
testing:
|
||||
path: ../../pkg/testing/
|
|
@ -18,7 +18,6 @@ import 'package:gardening/src/util.dart';
|
|||
|
||||
import 'test_client.dart';
|
||||
|
||||
// TODO(johnniwinther): Use 'package:testing' to run all tests.
|
||||
main(List<String> args) async {
|
||||
ArgParser argParser = createArgParser();
|
||||
argParser.addFlag('force', abbr: 'f');
|
||||
|
|
3
tools/gardening/test/gardening.status
Normal file
3
tools/gardening/test/gardening.status
Normal file
|
@ -0,0 +1,3 @@
|
|||
# Copyright (c) 2017, 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.md file.
|
|
@ -9,7 +9,6 @@ import 'package:gardening/src/util.dart';
|
|||
|
||||
import 'test_client.dart';
|
||||
|
||||
// TODO(johnniwinther): Use 'package:testing' to run all tests.
|
||||
main(List<String> args) async {
|
||||
ArgParser argParser = createArgParser();
|
||||
argParser.addFlag('force', abbr: 'f');
|
||||
|
|
33
tools/gardening/testing.json
Normal file
33
tools/gardening/testing.json
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"":"Copyright (c) 2017, 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.md file.",
|
||||
|
||||
"packages": ".packages",
|
||||
|
||||
"suites": [
|
||||
{
|
||||
"name": "dart_vm",
|
||||
"kind": "Chain",
|
||||
"source": "package:testing/dart_vm_suite.dart",
|
||||
"path": "test/",
|
||||
"status": "test/gardening.status",
|
||||
"pattern": [
|
||||
"\\_test.dart$"
|
||||
],
|
||||
"exclude": [
|
||||
"buildbot_data_test.dart"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
"analyze": {
|
||||
"options": "analysis_options.yaml",
|
||||
|
||||
"uris": [
|
||||
"bin/",
|
||||
"lib/",
|
||||
"test/"
|
||||
]
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue