Reland "add a benchmark test for stack size (#75039)" (#75434)

* Reland "add a benchmark test for stack size (#75039)"

This reverts commit de683de9d5.

* fix typo
This commit is contained in:
chunhtai
2021-02-04 12:16:31 -08:00
committed by GitHub
parent bc1cf49458
commit 713fa8e360
9 changed files with 355 additions and 33 deletions

View File

@@ -22,6 +22,18 @@ void main() {
tearDown(() {
});
group('cpu check', () {
test('arm64', () async {
FakeDevice.pretendArm64();
final AndroidDevice androidDevice = device as AndroidDevice;
expect(await androidDevice.isArm64(), isTrue);
expectLog(<CommandArgs>[
cmd(command: 'getprop', arguments: <String>['ro.bootimage.build.fingerprint', ';', 'getprop', 'ro.build.version.release', ';', 'getprop', 'ro.build.version.sdk'], environment: null),
cmd(command: 'getprop', arguments: <String>['ro.product.cpu.abi'], environment: null),
]);
});
});
group('isAwake/isAsleep', () {
test('reads Awake', () async {
FakeDevice.pretendAwake();
@@ -187,6 +199,12 @@ class FakeDevice extends AndroidDevice {
''';
}
static void pretendArm64() {
output = '''
arm64
''';
}
@override
Future<String> shellEval(String command, List<String> arguments, { Map<String, String> environment, bool silent = false }) async {
commandLog.add(CommandArgs(