Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
6beafa7b
Unverified
Commit
6beafa7b
authored
Apr 27, 2021
by
Ian Hickson
Committed by
GitHub
Apr 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply style guide regarding createTempSync pattern (#81090)
parent
a7eb2c8a
Changes
23
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
33 additions
and
50 deletions
+33
-50
browser.dart
dev/bots/browser.dart
+2
-2
flutter_gallery_v2_chrome_run_test.dart
...vicelab/bin/tasks/flutter_gallery_v2_chrome_run_test.dart
+1
-1
flutter_gallery_v2_web_compile_test.dart
...icelab/bin/tasks/flutter_gallery_v2_web_compile_test.dart
+1
-1
ios_app_with_extensions_test.dart
dev/devicelab/bin/tasks/ios_app_with_extensions_test.dart
+1
-1
module_test_ios.dart
dev/devicelab/bin/tasks/module_test_ios.dart
+1
-1
native_ui_tests_ios32.dart
dev/devicelab/bin/tasks/native_ui_tests_ios32.dart
+1
-1
new_gallery__crane_perf.dart
dev/devicelab/bin/tasks/new_gallery__crane_perf.dart
+1
-1
new_gallery__transition_perf.dart
dev/devicelab/bin/tasks/new_gallery__transition_perf.dart
+1
-1
new_gallery_ios__transition_perf.dart
...devicelab/bin/tasks/new_gallery_ios__transition_perf.dart
+1
-1
web_benchmarks.dart
dev/devicelab/lib/tasks/web_benchmarks.dart
+1
-1
codesign_integration_test.dart
dev/tools/test/codesign_integration_test.dart
+1
-3
roll_dev_integration_test.dart
dev/tools/test/roll_dev_integration_test.dart
+1
-1
file_system.dart
packages/flutter_tools/lib/src/base/file_system.dart
+2
-3
flutter_cache.dart
packages/flutter_tools/lib/src/flutter_cache.dart
+1
-3
flutter_tester.dart
packages/flutter_tools/lib/src/tester/flutter_tester.dart
+1
-1
analyze_once_test.dart
...ools/test/commands.shard/permeable/analyze_once_test.dart
+5
-11
analytics_test.dart
...ages/flutter_tools/test/general.shard/analytics_test.dart
+1
-3
gradle_utils_test.dart
...r_tools/test/general.shard/android/gradle_utils_test.dart
+1
-1
devtools_launcher_test.dart
...tter_tools/test/general.shard/devtools_launcher_test.dart
+1
-1
plugins_test.dart
packages/flutter_tools/test/general.shard/plugins_test.dart
+3
-3
flutter_tester_test.dart
..._tools/test/general.shard/tester/flutter_tester_test.dart
+2
-2
analyze_size_test.dart
...utter_tools/test/integration.shard/analyze_size_test.dart
+1
-1
context.dart
packages/flutter_tools/test/src/context.dart
+2
-6
No files found.
dev/bots/browser.dart
View file @
6beafa7b
...
...
@@ -41,7 +41,7 @@ Future<String> evalTestAppInChrome({
})
.
add
(
createStaticHandler
(
appDirectory
));
shelf_io
.
serveRequests
(
server
,
cascade
.
handler
);
final
io
.
Directory
userDataDirectory
=
io
.
Directory
.
systemTemp
.
createTempSync
(
'
chrome_user_data_
'
);
final
io
.
Directory
userDataDirectory
=
io
.
Directory
.
systemTemp
.
createTempSync
(
'
flutter_chrome_user_data.
'
);
chrome
=
await
Chrome
.
launch
(
ChromeOptions
(
headless:
true
,
debugPort:
browserDebugPort
,
...
...
@@ -88,7 +88,7 @@ class AppServer {
});
});
shelf_io
.
serveRequests
(
server
,
cascade
.
handler
);
final
io
.
Directory
userDataDirectory
=
io
.
Directory
.
systemTemp
.
createTempSync
(
'
chrome_user_data_
'
);
final
io
.
Directory
userDataDirectory
=
io
.
Directory
.
systemTemp
.
createTempSync
(
'
flutter_chrome_user_data.
'
);
final
Completer
<
String
>
chromeErrorCompleter
=
Completer
<
String
>();
chrome
=
await
Chrome
.
launch
(
ChromeOptions
(
headless:
headless
,
...
...
dev/devicelab/bin/tasks/flutter_gallery_v2_chrome_run_test.dart
View file @
6beafa7b
...
...
@@ -38,7 +38,7 @@ class NewGalleryChromeRunTest {
/// Runs the test.
Future
<
TaskResult
>
run
()
async
{
final
Directory
galleryParentDir
=
Directory
.
systemTemp
.
createTempSync
(
'
temp
'
);
Directory
.
systemTemp
.
createTempSync
(
'
flutter_gallery_v2_chrome_run.
'
);
final
Directory
galleryDir
=
Directory
(
path
.
join
(
galleryParentDir
.
path
,
'gallery'
));
...
...
dev/devicelab/bin/tasks/flutter_gallery_v2_web_compile_test.dart
View file @
6beafa7b
...
...
@@ -25,7 +25,7 @@ class NewGalleryWebCompileTest {
/// Runs the test.
Future
<
TaskResult
>
run
()
async
{
final
Directory
galleryParentDir
=
Directory
.
systemTemp
.
createTempSync
(
'
temp
'
);
Directory
.
systemTemp
.
createTempSync
(
'
flutter_gallery_v2_web_compile.
'
);
final
Directory
galleryDir
=
Directory
(
path
.
join
(
galleryParentDir
.
path
,
'gallery'
));
...
...
dev/devicelab/bin/tasks/ios_app_with_extensions_test.dart
View file @
6beafa7b
...
...
@@ -19,7 +19,7 @@ Future<void> main() async {
String
watchDeviceID
;
String
phoneDeviceID
;
final
Directory
tempDir
=
Directory
.
systemTemp
.
createTempSync
(
'
ios_app_with_extensions_test
'
);
.
createTempSync
(
'
flutter_ios_app_with_extensions_test.
'
);
final
Directory
projectDir
=
Directory
(
path
.
join
(
tempDir
.
path
,
'app_with_extensions'
));
try
{
...
...
dev/devicelab/bin/tasks/module_test_ios.dart
View file @
6beafa7b
...
...
@@ -320,7 +320,7 @@ Future<void> main() async {
section
(
'Run platform unit tests'
);
final
String
resultBundleTemp
=
Directory
.
systemTemp
.
createTempSync
(
'module_test_ios_xcresult.'
).
path
;
final
String
resultBundleTemp
=
Directory
.
systemTemp
.
createTempSync
(
'
flutter_
module_test_ios_xcresult.'
).
path
;
await
testWithNewIOSSimulator
(
'TestAdd2AppSim'
,
(
String
deviceId
)
async
{
simulatorDeviceId
=
deviceId
;
final
String
resultBundlePath
=
path
.
join
(
resultBundleTemp
,
'result'
);
...
...
dev/devicelab/bin/tasks/native_ui_tests_ios32.dart
View file @
6beafa7b
...
...
@@ -44,7 +44,7 @@ Future<void> main() async {
final
String
codeSignStyle
=
environment
[
'FLUTTER_XCODE_CODE_SIGN_STYLE'
];
final
String
provisioningProfile
=
environment
[
'FLUTTER_XCODE_PROVISIONING_PROFILE_SPECIFIER'
];
final
String
resultBundleTemp
=
Directory
.
systemTemp
.
createTempSync
(
'native_ui_tests_ios32_xcresult.'
).
path
;
final
String
resultBundleTemp
=
Directory
.
systemTemp
.
createTempSync
(
'
flutter_
native_ui_tests_ios32_xcresult.'
).
path
;
final
String
resultBundlePath
=
path
.
join
(
resultBundleTemp
,
'result'
);
final
int
testResultExit
=
await
exec
(
'xcodebuild'
,
...
...
dev/devicelab/bin/tasks/new_gallery__crane_perf.dart
View file @
6beafa7b
...
...
@@ -14,7 +14,7 @@ Future<void> main() async {
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
final
Directory
galleryParentDir
=
Directory
.
systemTemp
.
createTempSync
(
'
new_gallery_test
'
);
Directory
.
systemTemp
.
createTempSync
(
'
flutter_new_gallery_test.
'
);
final
Directory
galleryDir
=
Directory
(
path
.
join
(
galleryParentDir
.
path
,
'gallery'
));
...
...
dev/devicelab/bin/tasks/new_gallery__transition_perf.dart
View file @
6beafa7b
...
...
@@ -13,7 +13,7 @@ import 'package:path/path.dart' as path;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
android
;
final
Directory
galleryParentDir
=
Directory
.
systemTemp
.
createTempSync
(
'
new_gallery_test
'
);
final
Directory
galleryParentDir
=
Directory
.
systemTemp
.
createTempSync
(
'
flutter_new_gallery_test.
'
);
final
Directory
galleryDir
=
Directory
(
path
.
join
(
galleryParentDir
.
path
,
'gallery'
));
try
{
...
...
dev/devicelab/bin/tasks/new_gallery_ios__transition_perf.dart
View file @
6beafa7b
...
...
@@ -13,7 +13,7 @@ import 'package:path/path.dart' as path;
Future
<
void
>
main
()
async
{
deviceOperatingSystem
=
DeviceOperatingSystem
.
ios
;
final
Directory
galleryParentDir
=
Directory
.
systemTemp
.
createTempSync
(
'
new_gallery_test
'
);
final
Directory
galleryParentDir
=
Directory
.
systemTemp
.
createTempSync
(
'
flutter_new_gallery_test.
'
);
final
Directory
galleryDir
=
Directory
(
path
.
join
(
galleryParentDir
.
path
,
'gallery'
));
try
{
...
...
dev/devicelab/lib/tasks/web_benchmarks.dart
View file @
6beafa7b
...
...
@@ -121,7 +121,7 @@ Future<TaskResult> runWebBenchmark({ @required bool useCanvasKit }) async {
shelf_io
.
serveRequests
(
server
,
cascade
.
handler
);
final
String
dartToolDirectory
=
path
.
join
(
'
$macrobenchmarksDirectory
/.dart_tool'
);
final
String
userDataDir
=
io
.
Directory
(
dartToolDirectory
).
createTempSync
(
'
chrome_user_data_
'
).
path
;
final
String
userDataDir
=
io
.
Directory
(
dartToolDirectory
).
createTempSync
(
'
flutter_chrome_user_data.
'
).
path
;
// TODO(yjbanov): temporarily disables headful Chrome until we get
// devicelab hardware that is able to run it. Our current
...
...
dev/tools/test/codesign_integration_test.dart
View file @
6beafa7b
...
...
@@ -20,9 +20,7 @@ void main() {
()
async
{
const
Platform
platform
=
LocalPlatform
();
const
FileSystem
fileSystem
=
LocalFileSystem
();
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'conductor_integration_test'
,
);
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_conductor_integration_test.'
);
const
ProcessManager
processManager
=
LocalProcessManager
();
final
TestStdio
stdio
=
TestStdio
(
verbose:
true
);
final
Checkouts
checkouts
=
Checkouts
(
...
...
dev/tools/test/roll_dev_integration_test.dart
View file @
6beafa7b
...
...
@@ -30,7 +30,7 @@ void main() {
fileSystem
=
const
LocalFileSystem
();
processManager
=
const
LocalProcessManager
();
stdio
=
TestStdio
(
verbose:
true
);
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_conductor_checkouts'
);
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_conductor_checkouts
.
'
);
checkouts
=
Checkouts
(
fileSystem:
fileSystem
,
parentDirectory:
tempDir
,
...
...
packages/flutter_tools/lib/src/base/file_system.dart
View file @
6beafa7b
...
...
@@ -218,9 +218,8 @@ class LocalFileSystem extends local_fs.LocalFileSystem {
@override
Directory
get
systemTempDirectory
{
if
(
_systemTemp
==
null
)
{
_systemTemp
=
super
.
systemTempDirectory
.
createTempSync
(
'flutter_tools.'
,
)..
createSync
(
recursive:
true
);
_systemTemp
=
super
.
systemTempDirectory
.
createTempSync
(
'flutter_tools.'
)
..
createSync
(
recursive:
true
);
// Make sure that the temporary directory is cleaned up if the tool is
// killed by a signal.
for
(
final
ProcessSignal
signal
in
_fatalSignals
)
{
...
...
packages/flutter_tools/lib/src/flutter_cache.dart
View file @
6beafa7b
...
...
@@ -419,9 +419,7 @@ class AndroidMavenArtifacts extends ArtifactSet {
if
(
globals
.
androidSdk
==
null
)
{
return
;
}
final
Directory
tempDir
=
cache
.
getRoot
().
createTempSync
(
'flutter_gradle_wrapper.'
,
);
final
Directory
tempDir
=
cache
.
getRoot
().
createTempSync
(
'flutter_gradle_wrapper.'
);
globals
.
gradleUtils
.
injectGradleWrapperIfNeeded
(
tempDir
);
final
Status
status
=
logger
.
startProgress
(
'Downloading Android Maven dependencies...'
);
...
...
packages/flutter_tools/lib/src/tester/flutter_tester.dart
View file @
6beafa7b
...
...
@@ -156,7 +156,7 @@ class FlutterTesterDevice extends Device {
}
final
Directory
assetDirectory
=
_fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter
-tester
'
);
.
createTempSync
(
'flutter
_tester.
'
);
final
String
applicationKernelFilePath
=
getKernelPathForTransformerOptions
(
_fileSystem
.
path
.
join
(
assetDirectory
.
path
,
'flutter-tester-app.dill'
),
trackWidgetCreation:
buildInfo
.
trackWidgetCreation
,
...
...
packages/flutter_tools/test/commands.shard/permeable/analyze_once_test.dart
View file @
6beafa7b
...
...
@@ -139,9 +139,7 @@ void main() {
});
setUp
(()
{
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_analyze_once_test_1.'
,
).
absolute
;
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_analyze_once_test_1.'
).
absolute
;
projectPath
=
fileSystem
.
path
.
join
(
tempDir
.
path
,
'flutter_project'
);
fileSystem
.
file
(
fileSystem
.
path
.
join
(
projectPath
,
'pubspec.yaml'
))
..
createSync
(
recursive:
true
)
...
...
@@ -387,8 +385,7 @@ StringBuffer bar = StringBuffer('baz');
});
testUsingContext
(
'analyze once with default options has info issue finally exit code 1.'
,
()
async
{
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_analyze_once_default_options_info_issue_exit_code_1.'
);
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_analyze_once_default_options_info_issue_exit_code_1.'
);
_createDotPackages
(
tempDir
.
path
);
const
String
infoSourceCode
=
'''
...
...
@@ -422,8 +419,7 @@ int analyze() {}
});
testUsingContext
(
'analyze once with no-fatal-infos has info issue finally exit code 0.'
,
()
async
{
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_analyze_once_no_fatal_infos_info_issue_exit_code_0.'
);
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_analyze_once_no_fatal_infos_info_issue_exit_code_0.'
);
_createDotPackages
(
tempDir
.
path
);
const
String
infoSourceCode
=
'''
...
...
@@ -457,8 +453,7 @@ int analyze() {}
});
testUsingContext
(
'analyze once only fatal-warnings has info issue finally exit code 0.'
,
()
async
{
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_analyze_once_only_fatal_warnings_info_issue_exit_code_0.'
);
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_analyze_once_only_fatal_warnings_info_issue_exit_code_0.'
);
_createDotPackages
(
tempDir
.
path
);
const
String
infoSourceCode
=
'''
...
...
@@ -492,8 +487,7 @@ int analyze() {}
});
testUsingContext
(
'analyze once only fatal-infos has warning issue finally exit code 1.'
,
()
async
{
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_analyze_once_only_fatal_infos_warning_issue_exit_code_1.'
);
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'flutter_analyze_once_only_fatal_infos_warning_issue_exit_code_1.'
);
_createDotPackages
(
tempDir
.
path
);
const
String
warningSourceCode
=
'''
...
...
packages/flutter_tools/test/general.shard/analytics_test.dart
View file @
6beafa7b
...
...
@@ -286,9 +286,7 @@ void main() {
Directory
tempDir
;
setUp
(()
{
tempDir
=
globals
.
fs
.
systemTempDirectory
.
createTempSync
(
'flutter_tools_analytics_bots_test.'
,
);
tempDir
=
globals
.
fs
.
systemTempDirectory
.
createTempSync
(
'flutter_tools_analytics_bots_test.'
);
});
tearDown
(()
{
...
...
packages/flutter_tools/test/general.shard/android/gradle_utils_test.dart
View file @
6beafa7b
...
...
@@ -134,7 +134,7 @@ void main() {
};
for
(
final
MapEntry
<
String
,
String
>
entry
in
testCases
.
entries
)
{
final
Directory
sampleAppAndroid
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'
android
'
);
final
Directory
sampleAppAndroid
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'
flutter_android.
'
);
sampleAppAndroid
.
childFile
(
'build.gradle'
)
.
writeAsStringSync
(
'''
...
...
packages/flutter_tools/test/general.shard/devtools_launcher_test.dart
View file @
6beafa7b
...
...
@@ -28,7 +28,7 @@ void main() {
logger
=
BufferLogger
.
test
();
platform
=
FakePlatform
(
environment:
<
String
,
String
>{});
final
Directory
tempDir
=
globals
.
fs
.
systemTempDirectory
.
createTempSync
(
'
devtools_launcher_test
'
);
final
Directory
tempDir
=
globals
.
fs
.
systemTempDirectory
.
createTempSync
(
'
flutter_devtools_launcher_test.
'
);
persistentToolState
=
PersistentToolState
.
test
(
directory:
tempDir
,
logger:
logger
,
...
...
packages/flutter_tools/test/general.shard/plugins_test.dart
View file @
6beafa7b
...
...
@@ -341,7 +341,7 @@ flutter:
assert
(
name
!=
null
);
assert
(
dependencies
!=
null
);
final
Directory
pluginDirectory
=
fs
.
systemTempDirectory
.
createTempSync
(
'plugin.'
);
final
Directory
pluginDirectory
=
fs
.
systemTempDirectory
.
createTempSync
(
'
flutter_
plugin.'
);
pluginDirectory
.
childFile
(
'pubspec.yaml'
)
.
writeAsStringSync
(
'''
...
...
@@ -874,7 +874,7 @@ dependencies:
testUsingContext
(
"Registrant for web doesn't escape slashes in imports"
,
()
async
{
when
(
flutterProject
.
isModule
).
thenReturn
(
true
);
final
Directory
webPluginWithNestedFile
=
fs
.
systemTempDirectory
.
createTempSync
(
'
web_plugin_with_nested
'
);
fs
.
systemTempDirectory
.
createTempSync
(
'
flutter_web_plugin_with_nested.
'
);
webPluginWithNestedFile
.
childFile
(
'pubspec.yaml'
).
writeAsStringSync
(
'''
flutter:
plugin:
...
...
@@ -1329,7 +1329,7 @@ flutter:
Directory
projectDir
;
Directory
tempDir
;
setUp
(()
{
tempDir
=
globals
.
fs
.
systemTempDirectory
.
createTempSync
(
'plugin_test.'
);
tempDir
=
globals
.
fs
.
systemTempDirectory
.
createTempSync
(
'
flutter_
plugin_test.'
);
projectDir
=
tempDir
.
childDirectory
(
'flutter_project'
);
});
...
...
packages/flutter_tools/test/general.shard/tester/flutter_tester_test.dart
View file @
6beafa7b
...
...
@@ -151,8 +151,8 @@ void main() {
'--non-interactive'
,
'--enable-dart-profiling'
,
'--packages=.packages'
,
'--flutter-assets-dir=/.tmp_rand0/flutter
-tester
rand0'
,
'/.tmp_rand0/flutter
-tester
rand0/flutter-tester-app.dill'
,
'--flutter-assets-dir=/.tmp_rand0/flutter
_tester.
rand0'
,
'/.tmp_rand0/flutter
_tester.
rand0/flutter-tester-app.dill'
,
],
completer:
completer
,
stdout:
...
...
packages/flutter_tools/test/integration.shard/analyze_size_test.dart
View file @
6beafa7b
...
...
@@ -122,7 +122,7 @@ void main() {
testWithoutContext
(
'--analyze-size allows overriding the directory for code size files'
,
()
async
{
final
String
flutterBin
=
fileSystem
.
path
.
join
(
getFlutterRoot
(),
'bin'
,
'flutter'
);
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'
size_test
'
);
final
Directory
tempDir
=
fileSystem
.
systemTempDirectory
.
createTempSync
(
'
flutter_size_test.
'
);
final
ProcessResult
result
=
await
processManager
.
run
(<
String
>[
flutterBin
,
...
...
packages/flutter_tools/test/src/context.dart
View file @
6beafa7b
...
...
@@ -87,9 +87,7 @@ void testUsingContext(
}
});
Config
buildConfig
(
FileSystem
fs
)
{
configDir
??=
globals
.
fs
.
systemTempDirectory
.
createTempSync
(
'flutter_config_dir_test.'
,
);
configDir
??=
globals
.
fs
.
systemTempDirectory
.
createTempSync
(
'flutter_config_dir_test.'
);
return
Config
.
test
(
name:
Config
.
kFlutterSettings
,
directory:
configDir
,
...
...
@@ -97,9 +95,7 @@ void testUsingContext(
);
}
PersistentToolState
buildPersistentToolState
(
FileSystem
fs
)
{
configDir
??=
globals
.
fs
.
systemTempDirectory
.
createTempSync
(
'flutter_config_dir_test.'
,
);
configDir
??=
globals
.
fs
.
systemTempDirectory
.
createTempSync
(
'flutter_config_dir_test.'
);
return
PersistentToolState
.
test
(
directory:
configDir
,
logger:
globals
.
logger
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment