[infra] Add --list-configurations option to test.dart.
This option makes the available named configurations much more discoverable. Additionally this change expands the available named configurations by generalizing the operating system and processor architecture patterns in the named configurations. This change should ensure that nobody is doing any local testing that isn't covered by a named configuration. Change-Id: I776105955a86e9f0403ce07a3cdf971e4213646f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96320 Commit-Queue: Jonas Termansen <sortie@google.com> Reviewed-by: Alexander Thomas <athom@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
9faca2fa68
commit
8f03ae05ff
+16
-3
@@ -272,6 +272,8 @@ void main(List<String> args) async {
|
||||
help: "Select the builders building this branch",
|
||||
defaultsTo: "master");
|
||||
parser.addOption("commit", abbr: "C", help: "Compare with this commit");
|
||||
parser.addFlag("list-configurations",
|
||||
help: "Output list of configurations.", negatable: false);
|
||||
parser.addOption("named-configuration",
|
||||
abbr: "n",
|
||||
help: "The named test configuration that supplies the\nvalues for all "
|
||||
@@ -279,8 +281,9 @@ void main(List<String> args) async {
|
||||
parser.addOption("local-configuration",
|
||||
abbr: "N",
|
||||
help: "Use a different named configuration for local\ntesting than the "
|
||||
"named configuration the baseline\nresults were downloaded for.\nThe"
|
||||
"results may be inexact if the baseline configuration is different.");
|
||||
"named configuration the baseline\nresults were downloaded for. The "
|
||||
"results may be\ninexact if the baseline configuration is "
|
||||
"different.");
|
||||
parser.addOption("remote",
|
||||
abbr: "R",
|
||||
help: "Compare with this remote and git branch",
|
||||
@@ -289,7 +292,9 @@ void main(List<String> args) async {
|
||||
|
||||
final options = parser.parse(args);
|
||||
if (options["help"] ||
|
||||
(options["builder"] == null && options["named-configuration"] == null)) {
|
||||
(options["builder"] == null &&
|
||||
options["named-configuration"] == null &&
|
||||
!options["list-configurations"])) {
|
||||
print("""
|
||||
Usage: test.dart -b [BUILDER] -n [CONFIGURATION] [OPTION]... [--]
|
||||
[TEST.PY OPTION]... [SELECTOR]...
|
||||
@@ -309,6 +314,14 @@ ${parser.usage}""");
|
||||
return;
|
||||
}
|
||||
|
||||
if (options["list-configurations"]) {
|
||||
final process = await Process.start(
|
||||
"python", ["tools/test.py", "--list-configurations"],
|
||||
mode: ProcessStartMode.inheritStdio, runInShell: Platform.isWindows);
|
||||
exitCode = await process.exitCode;
|
||||
return;
|
||||
}
|
||||
|
||||
// Locate gsutil.py.
|
||||
gsutilPy =
|
||||
Platform.script.resolve("../third_party/gsutil/gsutil.py").toFilePath();
|
||||
|
||||
Reference in New Issue
Block a user