1// Copyright 2014 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5import 'dart:io';
6
7import 'package:path/path.dart' as path;
8
9import '../run_command.dart';
10import '../utils.dart';
11
12/// Runs the skp_generator from the flutter/tests repo.
13///
14/// See also the customer_tests shard.
15///
16/// Generated SKPs are ditched, this just verifies that it can run without failure.
17Future<void> skpGeneratorTestsRunner() async {
18 printProgress('${green}Running skp_generator from flutter/tests$reset');
19 final Directory checkout = Directory.systemTemp.createTempSync('flutter_skp_generator.');
20 await runCommand('git', <String>[
21 '-c',
22 'core.longPaths=true',
23 'clone',
24 'https://github.com/flutter/tests.git',
25 '.',
26 ], workingDirectory: checkout.path);
27 await runCommand(
28 './build.sh',
29 const <String>[],
30 workingDirectory: path.join(checkout.path, 'skp_generator'),
31 );
32}
33