Analyze package:testing.

R=johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2941493002 .
This commit is contained in:
Peter von der Ahé 2017-06-13 15:46:03 +02:00
parent 5917139015
commit 964384424a
4 changed files with 36 additions and 7 deletions

View 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

View file

@ -158,9 +158,9 @@ Future<Null> analyzeUris(
if (uris.isEmpty) return;
String topLevel;
try {
topLevel = Uri
.directory(await git("rev-parse", <String>["--show-toplevel"]))
.toFilePath();
topLevel = new Uri.directory(
await git("rev-parse", <String>["--show-toplevel"]).trimRight())
.toFilePath(windows: false);
} catch (e) {
topLevel = Uri.base.toFilePath(windows: false);
}

View file

@ -0,0 +1,12 @@
// 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.
import "package:testing/src/run_tests.dart" as testing show main;
main() {
// This method is async, but keeps a port open to prevent the VM from exiting
// prematurely.
return testing.main(
<String>["--config=pkg/testing/testing.json", "--verbose", "analyze"]);
}

View file

@ -1,6 +1,10 @@
{ "Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file":0,
"for details. All rights reserved. Use of this source code is governed by a":0,
"BSD-style license that can be found in the LICENSE.md file.":0,
{
"":"Copyright (c) 2016, 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",
@ -15,10 +19,14 @@
]
}
],
"analyze": {
"options": "analysis_options.yaml",
"uris": [
"bin/",
"lib/",
"bin/run_tests.dart"
"test/"
]
}
}