Balance dart2js-unit-linux-x64-release shards.

The non-sharded tests takes 10 minutes and each of the sharded tests
takes 14 minutes. It's faster to shard immediately (costing one bot
more) and concurrently run the local tests.

Fix end to end dart2js test that times out when sharded and run outside
a directory called sdk.

Bug: b/290617138
Change-Id: If71f0d301edf565c9f15847098320106ca383635
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312983
Reviewed-by: William Hesse <whesse@google.com>
This commit is contained in:
Jonas Termansen 2023-07-14 15:38:29 +00:00
parent f7a138417c
commit 26a94439c6
2 changed files with 21 additions and 13 deletions

View file

@ -9,11 +9,19 @@ import 'package:path/path.dart' as path;
List<String> dart2JsCommand(List<String> args) {
String basePath = path.fromUri(Platform.script);
while (path.basename(basePath) != 'sdk') {
basePath = path.dirname(basePath);
const dart2jsEntry = 'pkg/compiler/lib/src/dart2js.dart';
String dart2jsPath;
while (true) {
dart2jsPath = path.normalize(path.join(basePath, dart2jsEntry));
if (File(dart2jsPath).existsSync()) {
break;
}
String parentPath = path.dirname(basePath);
if (parentPath == basePath) {
throw Exception('Failed to find $dart2jsEntry');
}
basePath = parentPath;
}
String dart2jsPath =
path.normalize(path.join(basePath, 'pkg/compiler/lib/src/dart2js.dart'));
final command = <String>[];
command.add('--no-sound-null-safety');
if (Platform.packageConfig != null) {

View file

@ -2350,6 +2350,15 @@
"create_sdk"
]
},
{
"name": "dart2js unit tests",
"arguments": [
"-nweb-unittest-asserts-linux",
"pkg//compiler/"
],
"shards": 4,
"fileset": "js_platform_2"
},
{
"name": "dart2js legacy modular tests",
"script": "out/ReleaseX64/dart-sdk/bin/dart",
@ -2378,15 +2387,6 @@
"-nweb-unittest-asserts-linux",
"pkg//js_runtime/"
]
},
{
"name": "dart2js unit tests",
"arguments": [
"-nweb-unittest-asserts-linux",
"pkg//compiler/"
],
"shards": 3,
"fileset": "js_platform_2"
}
]
},