mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
parent
959cdb79fb
commit
a66eae17a2
@ -13,8 +13,10 @@ Future<void> main() async {
|
||||
await task(() async {
|
||||
await createFlavorsTest().call();
|
||||
await createIntegrationTestFlavorsTest().call();
|
||||
// test install and uninstall of flavors app
|
||||
await inDirectory('${flutterDirectory.path}/dev/integration_tests/flavors', () async {
|
||||
|
||||
final TaskResult installTestsResult = await inDirectory(
|
||||
'${flutterDirectory.path}/dev/integration_tests/flavors',
|
||||
() async {
|
||||
await flutter(
|
||||
'install',
|
||||
options: <String>['--debug', '--flavor', 'paid'],
|
||||
@ -23,6 +25,7 @@ Future<void> main() async {
|
||||
'install',
|
||||
options: <String>['--debug', '--flavor', 'paid', '--uninstall-only'],
|
||||
);
|
||||
|
||||
final StringBuffer stderr = StringBuffer();
|
||||
await evalFlutter(
|
||||
'install',
|
||||
@ -32,12 +35,15 @@ Future<void> main() async {
|
||||
);
|
||||
|
||||
final String stderrString = stderr.toString();
|
||||
if (!stderrString.contains('The Xcode project defines schemes: free, paid')) {
|
||||
if (!stderrString.contains('"build/app/outputs/flutter-apk/app-bogus-release.apk" does not exist.')) {
|
||||
print(stderrString);
|
||||
return TaskResult.failure('Should not succeed with bogus flavor');
|
||||
}
|
||||
});
|
||||
|
||||
return TaskResult.success(null);
|
||||
},
|
||||
);
|
||||
|
||||
return installTestsResult;
|
||||
});
|
||||
}
|
||||
|
@ -14,7 +14,9 @@ Future<void> main() async {
|
||||
await createFlavorsTest().call();
|
||||
await createIntegrationTestFlavorsTest().call();
|
||||
// test install and uninstall of flavors app
|
||||
await inDirectory('${flutterDirectory.path}/dev/integration_tests/flavors', () async {
|
||||
final TaskResult installTestsResult = await inDirectory(
|
||||
'${flutterDirectory.path}/dev/integration_tests/flavors',
|
||||
() async {
|
||||
await flutter(
|
||||
'install',
|
||||
options: <String>['--flavor', 'paid'],
|
||||
@ -32,12 +34,15 @@ Future<void> main() async {
|
||||
);
|
||||
|
||||
final String stderrString = stderr.toString();
|
||||
if (!stderrString.contains('install failed, bogus flavor not found')) {
|
||||
if (!stderrString.contains('The Xcode project defines schemes: free, paid')) {
|
||||
print(stderrString);
|
||||
return TaskResult.failure('Should not succeed with bogus flavor');
|
||||
}
|
||||
});
|
||||
|
||||
return TaskResult.success(null);
|
||||
},
|
||||
);
|
||||
|
||||
return installTestsResult;
|
||||
});
|
||||
}
|
||||
|
@ -14,7 +14,9 @@ Future<void> main() async {
|
||||
await createFlavorsTest().call();
|
||||
await createIntegrationTestFlavorsTest().call();
|
||||
|
||||
await inDirectory('${flutterDirectory.path}/dev/integration_tests/flavors', () async {
|
||||
final TaskResult installTestsResult = await inDirectory(
|
||||
'${flutterDirectory.path}/dev/integration_tests/flavors',
|
||||
() async {
|
||||
final StringBuffer stderr = StringBuffer();
|
||||
|
||||
await evalFlutter(
|
||||
@ -32,8 +34,11 @@ Future<void> main() async {
|
||||
print(stderrString);
|
||||
return TaskResult.failure('Installing a macOS app on macOS should no-op');
|
||||
}
|
||||
});
|
||||
|
||||
return TaskResult.success(null);
|
||||
},
|
||||
);
|
||||
|
||||
return installTestsResult;
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user