d43d9df1a7
Change-Id: If92f55296dfe83b64165a2bd07eaefb7d137198c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/497341 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>
36 lines
1.3 KiB
Dart
36 lines
1.3 KiB
Dart
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
|
|
// for details. All rights reserved. Use of this source code is governed by a
|
|
// BSD-style license that can be found in the LICENSE file.
|
|
|
|
/// Defines how dynamic modules get compiled and executed on each target
|
|
/// platform.
|
|
library;
|
|
|
|
import 'model.dart';
|
|
|
|
/// Possible backends where the tests can be executed.
|
|
enum Target { aot, jit, ddc }
|
|
|
|
/// Defines how to build and run a test in a specific target.
|
|
///
|
|
/// The test framework will use a single executor for all tests in a suite. This
|
|
/// can be leveraged to keep compilers warm and cache results if that is
|
|
/// helpful.
|
|
abstract class TargetExecutor {
|
|
/// Takes the steps necessary to build the initial version of the app.
|
|
Future compileApplication(DynamicModuleTest test);
|
|
|
|
/// Takes the steps necessary to build a single dynamic module.
|
|
Future compileDynamicModule(DynamicModuleTest test, String name);
|
|
|
|
/// Takes the steps necessary to execute the test.
|
|
///
|
|
/// This step will only be called after both the app and modules have been
|
|
/// generated.
|
|
Future executeApplication(DynamicModuleTest test);
|
|
|
|
/// Notification that all tests have been executed and that this executor is
|
|
/// no longer going to be used anymore.
|
|
Future suiteComplete();
|
|
}
|