flutter/dev/devicelab/bin/tasks/plugin_test_linux.dart
stuartmorgan e65dfba8e1
Add Linux unit tests to plugin template (#120814)
* Add Linux unit tests to plugin template

Adds an example native unit test to the plugin template for Linux,
matching the structure we use for our 1P plugin unit tests. Once these
have been added for all platforms+languages, they will be documented on
a new plugin development page to explain their use.

While ideally we would adjust the engine APIs first to allow for testing
the method call handler directly, it's unclear when we will have time
for that work, and for a complex plugin most of the testing wouldn't be
at that layer anyway, so having the structure in place with the
limitations documented is still a significant improvement over having
nothing in the template.

Part of https://github.com/flutter/flutter/issues/82458

* Add creation test

* Add integration tests

* Missing newlines

* test owner

* Typo
2023-02-15 19:13:11 +00:00

17 lines
684 B
Dart

// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter_devicelab/framework/framework.dart';
import 'package:flutter_devicelab/tasks/plugin_tests.dart';
Future<void> main() async {
await task(combine(<TaskFunction>[
PluginTest('linux', <String>['--platforms=linux']).call,
// Test that Dart-only plugins are supported.
PluginTest('linux', <String>['--platforms=linux'], dartOnlyPlugin: true).call,
// Test that FFI plugins are supported.
PluginTest('linux', <String>['--platforms=linux'], template: 'plugin_ffi').call,
]));
}