Skip to content

Commit 4a80b6d

Browse files
nshahanCommit Queue
authored andcommitted
[ddc] Update hot reload test names in results
Makes the test results more predictable and easier to search for by matching the pattern of other test suites. Examples: `tests/reload//b/s/w/ir/cache/builder/sdk/tests/hot_reload/const_to_non_const_class/main.1.dart-diff` becomes `hot_reload/const_to_non_const_class/main.1.dart-diff` `tests/reload/const_to_non_const_class` becomes `hot_reload/const_to_non_const_class` Fixes: #56880 Change-Id: I0f9399e74c3e07e3628d2bf3dcfbe0c21b7b9122 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/390060 Commit-Queue: Nicholas Shahan <[email protected]> Reviewed-by: Nate Biggs <[email protected]>
1 parent 47f69b1 commit 4a80b6d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pkg/dev_compiler/test/hot_reload_suite.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import 'package:collection/collection.dart';
1313
import 'package:dev_compiler/dev_compiler.dart' as ddc_names
1414
show libraryUriToJsIdentifier;
1515
import 'package:front_end/src/api_unstable/ddc.dart' as fe;
16+
import 'package:path/path.dart' as p;
1617
import 'package:reload_test/ddc_helpers.dart' as ddc_helpers;
1718
import 'package:reload_test/frontend_server_controller.dart';
1819
import 'package:reload_test/hot_reload_memory_filesystem.dart';
@@ -232,9 +233,10 @@ Future<void> main(List<String> args) async {
232233
// Report results for this test's sources' diff validations.
233234
void reportDiffOutcome(Uri fileUri, String testOutput, bool testPassed) {
234235
final filePath = fileUri.path;
236+
final relativeFilePath = p.relative(filePath, from: allTestsUri.path);
235237
var outcome = TestResultOutcome(
236238
configuration: argResults['named-configuration'] as String,
237-
testName: '$filePath-diff',
239+
testName: '$relativeFilePath-diff',
238240
testOutput: testOutput,
239241
);
240242
outcome.elapsedTime = stopwatch.elapsed;

pkg/reload_test/lib/test_helpers.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class TestResultOutcome {
1818

1919
TestResultOutcome({
2020
required this.configuration,
21-
this.suiteName = 'tests/reload',
21+
this.suiteName = 'hot_reload',
2222
required this.testName,
2323
this.expectedResult = 'Pass',
2424
this.testOutput = '',

0 commit comments

Comments
 (0)