Skip to content

Commit

Permalink
[CFE] Increase timeout on fasta/bootstrap_test and add -Dbenchmark=tr…
Browse files Browse the repository at this point in the history
…ue to get details into runtime

The test runs 3 processes, each has a timeout of 60 seconds.
On my machine each takes ~16 seconds, but apparently on the bots it
times out (i.e. will take more than 60 seconds).

This CL increases the timeout to two minutes and adds a flag which
will print timings for visibility into what takes time.

Probably fixes #49202

Change-Id: I1b178368e85054db0822b1c154f47eeffc2baf52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248580
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
  • Loading branch information
jensjoha authored and Commit Bot committed Jun 16, 2022
1 parent 2e1cbc7 commit e4e3e09
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pkg/front_end/test/fasta/bootstrap_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,20 @@ Future runCompiler(Uri compiler, Uri input, Uri output) async {
Uri dartVm = Uri.base.resolveUri(new Uri.file(Platform.resolvedExecutable));
String executable = dartVm.toFilePath();
List<String> arguments = <String>[
"-Dbenchmark=true",
compiler.toFilePath(),
"${Flags.compileSdk}=sdk/",
"${Flags.output}=${output.toFilePath()}",
Flags.verify,
input.toFilePath(),
"-Dbenchmark=true",
];
print('Running: $executable ${arguments.join(' ')}');
StdioProcess result =
await StdioProcess.run(executable, arguments, suppressOutput: false);
Stopwatch stopwatch = new Stopwatch()..start();
StdioProcess result = await StdioProcess.run(executable, arguments,
suppressOutput: false, timeout: const Duration(minutes: 2));
print("Run finished with exit code ${result.exitCode}"
" in ${stopwatch.elapsed}");
if (result.exitCode != 0) {
throw "Compilation failed:\n${result.output}";
}
Expand Down
1 change: 1 addition & 0 deletions pkg/front_end/test/spell_checking_list_tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ datatypes
day
days
db
dbenchmark
ddart
dds
debugger
Expand Down

0 comments on commit e4e3e09

Please sign in to comment.