Skip to content

Commit a067d75

Browse files
bkonyiCommit Queue
authored andcommitted
[ Observatory ] Remove legacy Observatory VM service tests
Clean up test_runner and the test matrix to remove all references to the service test suite and delete the tests. Work towards #50233 TEST=N/A Change-Id: Ie3adb0d007d71f9a223843d739e57cbdb5be0d59 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429140 Reviewed-by: Siva Annamalai <[email protected]> Commit-Queue: Ben Konyi <[email protected]> Reviewed-by: Ivan Inozemtsev <[email protected]>
1 parent c8aab9f commit a067d75

File tree

313 files changed

+6
-24131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

313 files changed

+6
-24131
lines changed

PRESUBMIT.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -485,27 +485,6 @@ def _CheckCopyrightYear(input_api, output_api):
485485
]
486486

487487

488-
def _CheckNoNewObservatoryServiceTests(input_api, output_api):
489-
"""Ensures that no new tests are added to the Observatory test suite."""
490-
files = []
491-
492-
for f in input_api.AffectedFiles(include_deletes=False):
493-
path = f.LocalPath()
494-
if is_dart_file(path) and path.startswith(
495-
"runtime/observatory/tests/service/") and f.Action(
496-
) == 'A' and os.path.isfile(path):
497-
files.append(path)
498-
499-
if not files:
500-
return []
501-
502-
return [
503-
output_api.PresubmitError(
504-
'New VM service tests should be added to pkg/vm_service/test, ' +
505-
'not runtime/observatory/tests/service:\n' + '\n'.join(files))
506-
]
507-
508-
509488
def _CheckDevCompilerSync(input_api, output_api):
510489
"""Make sure that any changes in the original and the temporary forked
511490
version of the DDC compiler are kept in sync. If a CL touches the
@@ -571,7 +550,6 @@ def _CommonChecks(input_api, output_api):
571550
input_api.canned_checks.CheckPatchFormatted(input_api, output_api))
572551
results.extend(_CheckCopyrightYear(input_api, output_api))
573552
results.extend(_CheckAnalyzerFiles(input_api, output_api))
574-
results.extend(_CheckNoNewObservatoryServiceTests(input_api, output_api))
575553
results.extend(_CheckDevCompilerSync(input_api, output_api))
576554
results.extend(_CheckDartApiWinCSync(input_api, output_api))
577555
return results

pkg/test_runner/lib/src/test_configurations.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ export 'configuration.dart' show TestConfiguration;
2929
/// here, if possible.
3030
final testSuiteDirectories = [
3131
Path('pkg'),
32-
Path('runtime/observatory/tests/observatory_ui'),
33-
Path('runtime/observatory/tests/service'),
3432
Path('runtime/tests/vm'),
3533
Path('samples'),
3634
Path('tests/corelib'),

pkg/test_runner/lib/src/test_suite.dart

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -756,8 +756,6 @@ class StandardTestSuite extends TestSuite {
756756
_enqueueStandardTest(testFile, expectationSet, onTest);
757757
} else if (configuration.runtime.isBrowser) {
758758
_enqueueBrowserTest(testFile, expectationSet, onTest);
759-
} else if (suiteName == 'service') {
760-
_enqueueServiceTest(testFile, expectationSet, onTest);
761759
} else {
762760
_enqueueStandardTest(testFile, expectationSet, onTest);
763761
}
@@ -789,44 +787,6 @@ class StandardTestSuite extends TestSuite {
789787
}
790788
}
791789

792-
void _enqueueServiceTest(
793-
TestFile testFile, Set<Expectation> expectations, TestCaseEvent onTest) {
794-
var commonArguments = _commonArgumentsFromFile(testFile);
795-
796-
var vmOptionsList = getVmOptions(testFile);
797-
assert(vmOptionsList.isNotEmpty);
798-
799-
var emitDdsTest = false;
800-
for (var i = 0; i < 2; ++i) {
801-
for (var vmOptionsVariant = 0;
802-
vmOptionsVariant < vmOptionsList.length;
803-
vmOptionsVariant++) {
804-
var vmOptions = [
805-
...vmOptionsList[vmOptionsVariant],
806-
...extraVmOptions,
807-
if (emitDdsTest) '-DUSE_DDS=true',
808-
if (configuration.serviceResponseSizesDirectory != null)
809-
'-DSERVICE_RESPONSE_SIZES_DIR=${configuration.serviceResponseSizesDirectory}',
810-
];
811-
var isCrashExpected = expectations.contains(Expectation.crash);
812-
var commands = _makeCommands(
813-
testFile,
814-
vmOptionsVariant + (vmOptionsList.length * i),
815-
vmOptions,
816-
commonArguments,
817-
isCrashExpected);
818-
var variantTestName =
819-
'${testFile.name}/${emitDdsTest ? 'dds' : 'service'}';
820-
if (vmOptionsList.length > 1) {
821-
variantTestName = "${variantTestName}_$vmOptionsVariant";
822-
}
823-
824-
_addTestCase(testFile, variantTestName, commands, expectations, onTest);
825-
}
826-
emitDdsTest = true;
827-
}
828-
}
829-
830790
List<Command> _makeCommands(TestFile testFile, int vmOptionsVariant,
831791
List<String> vmOptions, List<String> args, bool isCrashExpected) {
832792
var commands = <Command>[];

pkg/test_runner/test/options_test.dart

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,7 @@ TestConfiguration parseConfiguration(List<String> arguments) {
160160

161161
List<TestConfiguration> parseConfigurations(List<String> arguments) {
162162
var parser = OptionsParser('pkg/test_runner/test/test_matrix.json');
163-
var configurations = parser.parse(arguments);
164-
165-
// By default, without an explicit selector, you get two configurations, one
166-
// for observatory_ui, and one for all the other selectors. Discard the
167-
// observatory one to keep things simpler.
168-
configurations
169-
.removeWhere((config) => config.selectors.containsKey('observatory_ui'));
170-
return configurations;
163+
return parser.parse(arguments);
171164
}
172165

173166
void expectValidationError(List<String> arguments, String error) {

pkg/test_runner/test/test_suite_test.dart

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import 'utils.dart';
1212
void main() {
1313
testNnbdRequirements();
1414
testVmOptions();
15-
testServiceTestVmOptions();
1615
}
1716

1817
void testNnbdRequirements() {
@@ -65,38 +64,6 @@ void testVmOptions() {
6564
]);
6665
}
6766

68-
void testServiceTestVmOptions() {
69-
// Note: The backslashes are to avoid the test_runner thinking these are
70-
// Requirements markers for this file itself.
71-
var testFiles = [
72-
createTestFile(
73-
source: "", path: "service_no_options_test.dart", suite: "service"),
74-
createTestFile(
75-
source: "/\/ VMOptions=--a",
76-
path: "service_one_option_test.dart",
77-
suite: "service"),
78-
createTestFile(
79-
source: "/\/ VMOptions=--a --b\n/\/ VMOptions=--c",
80-
path: "service_options_test.dart",
81-
suite: "service"),
82-
];
83-
84-
expectTestCases(
85-
[],
86-
testFiles,
87-
[
88-
"service/service_no_options_test/service",
89-
"service/service_no_options_test/dds",
90-
"service/service_one_option_test/service",
91-
"service/service_one_option_test/dds",
92-
"service/service_options_test/service_0",
93-
"service/service_options_test/service_1",
94-
"service/service_options_test/dds_0",
95-
"service/service_options_test/dds_1",
96-
],
97-
suite: "service");
98-
}
99-
10067
void expectTestCases(List<String> options, List<TestFile> testFiles,
10168
List<String> expectedCaseNames,
10269
{String suite = "language"}) {

pubspec.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,6 @@ dependency_overrides:
311311
path: third_party/pkg/tools/pkgs/io
312312
devtools_shared:
313313
path: third_party/devtools/devtools_shared
314-
observatory_test_package:
315-
path: runtime/observatory/tests/service/observatory_test_package
316314
# heapsnapshot has dependencies from outside the sdk, so cannot be part of
317315
# the workspace. https://github.com/dart-lang/sdk/issues/50061
318316
heapsnapshot:

runtime/observatory/tests/service/add_breakpoint_rpc_kernel_test.dart

Lines changed: 0 additions & 111 deletions
This file was deleted.

runtime/observatory/tests/service/allocations_test.dart

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)