-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add separate driver file for performance tests (#890)
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright 2021 The Flutter team. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
import 'dart:developer'; | ||
|
||
import 'package:integration_test/integration_test_driver.dart'; | ||
|
||
Future<void> main() { | ||
return integrationDriver( | ||
responseDataCallback: (data) async { | ||
// If the tests reported any data, save it to the disk. | ||
if (data != null) { | ||
for (var entry in data.entries) { | ||
log('Writing ${entry.key} to the disk.'); | ||
// Default storage destination is the 'build' directory. | ||
await writeResponseData( | ||
entry.value as Map<String, dynamic>, | ||
testOutputFilename: entry.key, | ||
); | ||
} | ||
} | ||
}, | ||
); | ||
} |