mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Refactor docs (#145998)
Refactor docs testing suite in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing docs tests Part of https://github.com/flutter/flutter/issues/145482
This commit is contained in:
parent
5705881f63
commit
8b83371e20
20
dev/bots/suite_runners/run_docs_tests.dart
Normal file
20
dev/bots/suite_runners/run_docs_tests.dart
Normal file
@ -0,0 +1,20 @@
|
||||
// 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 '../run_command.dart';
|
||||
import '../utils.dart';
|
||||
|
||||
Future<void> docsRunner(String flutterRoot) async {
|
||||
printProgress('${green}Running flutter doc tests$reset');
|
||||
await runCommand(
|
||||
'./dev/bots/docs.sh',
|
||||
const <String>[
|
||||
'--output',
|
||||
'dev/docs/api_docs.zip',
|
||||
'--keep-staging',
|
||||
'--staging-dir',
|
||||
'dev/docs',
|
||||
],
|
||||
workingDirectory: flutterRoot,
|
||||
);}
|
@ -66,6 +66,7 @@ import 'package:process/process.dart';
|
||||
import 'run_command.dart';
|
||||
import 'suite_runners/run_add_to_app_life_cycle_tests.dart';
|
||||
import 'suite_runners/run_analyze_tests.dart';
|
||||
import 'suite_runners/run_docs_tests.dart';
|
||||
import 'suite_runners/run_flutter_packages_tests.dart';
|
||||
import 'suite_runners/run_realm_checker_tests.dart';
|
||||
import 'suite_runners/run_skp_generator_tests.dart';
|
||||
@ -255,7 +256,7 @@ Future<void> main(List<String> args) async {
|
||||
'customer_testing': _runCustomerTesting,
|
||||
'analyze': () => analyzeRunner(flutterRoot),
|
||||
'fuchsia_precache': _runFuchsiaPrecache,
|
||||
'docs': _runDocs,
|
||||
'docs': () => docsRunner(flutterRoot),
|
||||
'verify_binaries_codesigned': _runVerifyCodesigned,
|
||||
kTestHarnessShardName: _runTestHarnessTests, // Used for testing this script; also run as part of SHARD=framework_tests, SUBSHARD=misc.
|
||||
});
|
||||
@ -1264,22 +1265,6 @@ Future<void> _runFuchsiaPrecache() async {
|
||||
);
|
||||
}
|
||||
|
||||
// Runs docs.
|
||||
Future<void> _runDocs() async {
|
||||
printProgress('${green}Running flutter doc tests$reset');
|
||||
await runCommand(
|
||||
'./dev/bots/docs.sh',
|
||||
<String>[
|
||||
'--output',
|
||||
'dev/docs/api_docs.zip',
|
||||
'--keep-staging',
|
||||
'--staging-dir',
|
||||
'dev/docs',
|
||||
],
|
||||
workingDirectory: flutterRoot,
|
||||
);
|
||||
}
|
||||
|
||||
// Verifies binaries are codesigned.
|
||||
Future<void> _runVerifyCodesigned() async {
|
||||
printProgress('${green}Running binaries codesign verification$reset');
|
||||
|
Loading…
Reference in New Issue
Block a user