Skip to content

Commit 60ec2b3

Browse files
committed
[dart2js] More sharding of rti_need and rti_emission tests
Both are now sharded 4-ways, which should reduce the individual shards to about 2 minutes. Change-Id: I5e8a718a0b5c58b0850015bee76f10df26aee84d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151141 Reviewed-by: Johnni Winther <[email protected]> Reviewed-by: Alexander Thomas <[email protected]>
1 parent 9b4b9ae commit 60ec2b3

12 files changed

+84
-10
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
spec:nnbd-off=pkg/compiler/test/rti/rti_emission_test.dart
2-
prod:nnbd-off=pkg/compiler/test/rti/rti_emission_test.dart
3-
spec:nnbd-sdk=pkg/compiler/test/rti/rti_emission_test.dart
4-
prod:nnbd-sdk=pkg/compiler/test/rti/rti_emission_test.dart
1+
spec:nnbd-off=pkg/compiler/test/rti/rti_emission_test_helper.dart
2+
prod:nnbd-off=pkg/compiler/test/rti/rti_emission_test_helper.dart
3+
spec:nnbd-sdk=pkg/compiler/test/rti/rti_emission_test_helper.dart
4+
prod:nnbd-sdk=pkg/compiler/test/rti/rti_emission_test_helper.dart
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
// @dart = 2.7
6+
7+
import 'rti_emission_test_helper.dart';
8+
9+
main(List<String> args) {
10+
runTests(args, 0);
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
// @dart = 2.7
6+
7+
import 'rti_emission_test_helper.dart';
8+
9+
main(List<String> args) {
10+
runTests(args, 1);
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
// @dart = 2.7
6+
7+
import 'rti_emission_test_helper.dart';
8+
9+
main(List<String> args) {
10+
runTests(args, 2);
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
// @dart = 2.7
6+
7+
import 'rti_emission_test_helper.dart';
8+
9+
main(List<String> args) {
10+
runTests(args, 3);
11+
}

pkg/compiler/test/rti/rti_emission_test.dart renamed to pkg/compiler/test/rti/rti_emission_test_helper.dart

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@ import '../equivalence/id_equivalence.dart';
2222
import '../equivalence/id_equivalence_helper.dart';
2323
import '../helpers/program_lookup.dart';
2424

25-
main(List<String> args) {
25+
runTests(List<String> args, [int shardIndex]) {
2626
asyncTest(() async {
2727
Directory dataDir =
2828
new Directory.fromUri(Platform.script.resolve('emission'));
29-
await checkTests(dataDir, const RtiEmissionDataComputer(), args: args);
29+
await checkTests(dataDir, const RtiEmissionDataComputer(),
30+
args: args,
31+
shardIndex: shardIndex ?? 0,
32+
shards: shardIndex != null ? 4 : 1);
3033
});
3134
}
3235

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
// @dart = 2.7
6+
7+
import 'rti_need_test_helper.dart';
8+
9+
main(List<String> args) {
10+
runTests(args, 2);
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
// @dart = 2.7
6+
7+
import 'rti_need_test_helper.dart';
8+
9+
main(List<String> args) {
10+
runTests(args, 3);
11+
}

pkg/compiler/test/rti/rti_need_test_helper.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ runTests(List<String> args, [int shardIndex]) {
3838
options: [],
3939
args: args,
4040
shardIndex: shardIndex ?? 0,
41-
shards: shardIndex != null ? 2 : 1);
41+
shards: shardIndex != null ? 4 : 1);
4242
});
4343
}
4444

pkg/compiler/test/rti/show.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import 'package:args/args.dart';
1010
import '../equivalence/id_equivalence_helper.dart';
1111
import '../equivalence/show_helper.dart';
12-
import 'rti_emission_test.dart';
12+
import 'rti_emission_test_helper.dart';
1313
import 'rti_need_test_helper.dart';
1414

1515
main(List<String> args) async {

0 commit comments

Comments
 (0)