mirror of
https://github.com/flutter/packages.git
synced 2025-05-25 16:58:01 +08:00
[tools] Convert test utils to RepositoryPackage (#5605)
This commit is contained in:
@ -198,22 +198,22 @@ this command.
|
||||
Future<_PlatformResult> _testAndroid(
|
||||
RepositoryPackage plugin, _TestMode mode) async {
|
||||
bool exampleHasUnitTests(RepositoryPackage example) {
|
||||
return example.directory
|
||||
.childDirectory('android')
|
||||
return example
|
||||
.platformDirectory(FlutterPlatform.android)
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('test')
|
||||
.existsSync() ||
|
||||
example.directory.parent
|
||||
.childDirectory('android')
|
||||
plugin
|
||||
.platformDirectory(FlutterPlatform.android)
|
||||
.childDirectory('src')
|
||||
.childDirectory('test')
|
||||
.existsSync();
|
||||
}
|
||||
|
||||
bool exampleHasNativeIntegrationTests(RepositoryPackage example) {
|
||||
final Directory integrationTestDirectory = example.directory
|
||||
.childDirectory('android')
|
||||
final Directory integrationTestDirectory = example
|
||||
.platformDirectory(FlutterPlatform.android)
|
||||
.childDirectory('app')
|
||||
.childDirectory('src')
|
||||
.childDirectory('androidTest');
|
||||
@ -269,7 +269,7 @@ this command.
|
||||
_printRunningExampleTestsMessage(example, 'Android');
|
||||
|
||||
final GradleProject project = GradleProject(
|
||||
example.directory,
|
||||
example,
|
||||
processRunner: processRunner,
|
||||
platform: platform,
|
||||
);
|
||||
|
Reference in New Issue
Block a user