mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
parent
959cdb79fb
commit
a66eae17a2
@ -13,31 +13,37 @@ Future<void> main() async {
|
|||||||
await task(() async {
|
await task(() async {
|
||||||
await createFlavorsTest().call();
|
await createFlavorsTest().call();
|
||||||
await createIntegrationTestFlavorsTest().call();
|
await createIntegrationTestFlavorsTest().call();
|
||||||
// test install and uninstall of flavors app
|
|
||||||
await inDirectory('${flutterDirectory.path}/dev/integration_tests/flavors', () async {
|
|
||||||
await flutter(
|
|
||||||
'install',
|
|
||||||
options: <String>['--debug', '--flavor', 'paid'],
|
|
||||||
);
|
|
||||||
await flutter(
|
|
||||||
'install',
|
|
||||||
options: <String>['--debug', '--flavor', 'paid', '--uninstall-only'],
|
|
||||||
);
|
|
||||||
final StringBuffer stderr = StringBuffer();
|
|
||||||
await evalFlutter(
|
|
||||||
'install',
|
|
||||||
canFail: true,
|
|
||||||
stderr: stderr,
|
|
||||||
options: <String>['--flavor', 'bogus'],
|
|
||||||
);
|
|
||||||
|
|
||||||
final String stderrString = stderr.toString();
|
final TaskResult installTestsResult = await inDirectory(
|
||||||
if (!stderrString.contains('The Xcode project defines schemes: free, paid')) {
|
'${flutterDirectory.path}/dev/integration_tests/flavors',
|
||||||
print(stderrString);
|
() async {
|
||||||
return TaskResult.failure('Should not succeed with bogus flavor');
|
await flutter(
|
||||||
}
|
'install',
|
||||||
});
|
options: <String>['--debug', '--flavor', 'paid'],
|
||||||
|
);
|
||||||
|
await flutter(
|
||||||
|
'install',
|
||||||
|
options: <String>['--debug', '--flavor', 'paid', '--uninstall-only'],
|
||||||
|
);
|
||||||
|
|
||||||
return TaskResult.success(null);
|
final StringBuffer stderr = StringBuffer();
|
||||||
|
await evalFlutter(
|
||||||
|
'install',
|
||||||
|
canFail: true,
|
||||||
|
stderr: stderr,
|
||||||
|
options: <String>['--flavor', 'bogus'],
|
||||||
|
);
|
||||||
|
|
||||||
|
final String stderrString = stderr.toString();
|
||||||
|
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,30 +14,35 @@ Future<void> main() async {
|
|||||||
await createFlavorsTest().call();
|
await createFlavorsTest().call();
|
||||||
await createIntegrationTestFlavorsTest().call();
|
await createIntegrationTestFlavorsTest().call();
|
||||||
// test install and uninstall of flavors app
|
// test install and uninstall of flavors app
|
||||||
await inDirectory('${flutterDirectory.path}/dev/integration_tests/flavors', () async {
|
final TaskResult installTestsResult = await inDirectory(
|
||||||
await flutter(
|
'${flutterDirectory.path}/dev/integration_tests/flavors',
|
||||||
'install',
|
() async {
|
||||||
options: <String>['--flavor', 'paid'],
|
await flutter(
|
||||||
);
|
'install',
|
||||||
await flutter(
|
options: <String>['--flavor', 'paid'],
|
||||||
'install',
|
);
|
||||||
options: <String>['--flavor', 'paid', '--uninstall-only'],
|
await flutter(
|
||||||
);
|
'install',
|
||||||
final StringBuffer stderr = StringBuffer();
|
options: <String>['--flavor', 'paid', '--uninstall-only'],
|
||||||
await evalFlutter(
|
);
|
||||||
'install',
|
final StringBuffer stderr = StringBuffer();
|
||||||
canFail: true,
|
await evalFlutter(
|
||||||
stderr: stderr,
|
'install',
|
||||||
options: <String>['--flavor', 'bogus'],
|
canFail: true,
|
||||||
);
|
stderr: stderr,
|
||||||
|
options: <String>['--flavor', 'bogus'],
|
||||||
|
);
|
||||||
|
|
||||||
final String stderrString = stderr.toString();
|
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);
|
print(stderrString);
|
||||||
return TaskResult.failure('Should not succeed with bogus flavor');
|
return TaskResult.failure('Should not succeed with bogus flavor');
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
return TaskResult.success(null);
|
return TaskResult.success(null);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
return installTestsResult;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -14,26 +14,31 @@ Future<void> main() async {
|
|||||||
await createFlavorsTest().call();
|
await createFlavorsTest().call();
|
||||||
await createIntegrationTestFlavorsTest().call();
|
await createIntegrationTestFlavorsTest().call();
|
||||||
|
|
||||||
await inDirectory('${flutterDirectory.path}/dev/integration_tests/flavors', () async {
|
final TaskResult installTestsResult = await inDirectory(
|
||||||
final StringBuffer stderr = StringBuffer();
|
'${flutterDirectory.path}/dev/integration_tests/flavors',
|
||||||
|
() async {
|
||||||
|
final StringBuffer stderr = StringBuffer();
|
||||||
|
|
||||||
await evalFlutter(
|
await evalFlutter(
|
||||||
'install',
|
'install',
|
||||||
canFail: true,
|
canFail: true,
|
||||||
stderr: stderr,
|
stderr: stderr,
|
||||||
options: <String>[
|
options: <String>[
|
||||||
'--d', 'macos',
|
'--d', 'macos',
|
||||||
'--flavor', 'free'
|
'--flavor', 'free'
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
final String stderrString = stderr.toString();
|
final String stderrString = stderr.toString();
|
||||||
if (!stderrString.contains('Host and target are the same. Nothing to install.')) {
|
if (!stderrString.contains('Host and target are the same. Nothing to install.')) {
|
||||||
print(stderrString);
|
print(stderrString);
|
||||||
return TaskResult.failure('Installing a macOS app on macOS should no-op');
|
return TaskResult.failure('Installing a macOS app on macOS should no-op');
|
||||||
}
|
}
|
||||||
});
|
|
||||||
|
|
||||||
return TaskResult.success(null);
|
return TaskResult.success(null);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
return installTestsResult;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user