mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

Refactor skp_generator_tests suite in order to reduce testing logic in test.dart and allow for later implementing package:test onto the existing skp_generator_tests tests Part of https://github.com/flutter/flutter/issues/145482
37 lines
1021 B
Dart
37 lines
1021 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 'dart:io';
|
|
|
|
import 'package:path/path.dart' as path;
|
|
|
|
import '../run_command.dart';
|
|
import '../utils.dart';
|
|
|
|
/// Runs the skp_generator from the flutter/tests repo.
|
|
///
|
|
/// See also the customer_tests shard.
|
|
///
|
|
/// Generated SKPs are ditched, this just verifies that it can run without failure.
|
|
Future<void> skpGeneratorTestsRunner() async {
|
|
printProgress('${green}Running skp_generator from flutter/tests$reset');
|
|
final Directory checkout = Directory.systemTemp.createTempSync('flutter_skp_generator.');
|
|
await runCommand(
|
|
'git',
|
|
<String>[
|
|
'-c',
|
|
'core.longPaths=true',
|
|
'clone',
|
|
'https://github.com/flutter/tests.git',
|
|
'.',
|
|
],
|
|
workingDirectory: checkout.path,
|
|
);
|
|
await runCommand(
|
|
'./build.sh',
|
|
const <String>[],
|
|
workingDirectory: path.join(checkout.path, 'skp_generator'),
|
|
);
|
|
}
|