| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // SharedOptions=--supermixin | 4 // SharedOptions=--supermixin |
| 5 | 5 |
| 6 library front_end.test.physical_file_system_test; | 6 library front_end.test.physical_file_system_test; |
| 7 | 7 |
| 8 import 'dart:async'; |
| 8 import 'dart:convert'; | 9 import 'dart:convert'; |
| 9 import 'dart:io' as io; | 10 import 'dart:io' as io; |
| 10 | 11 |
| 11 import 'package:front_end/file_system.dart'; | 12 import 'package:front_end/file_system.dart'; |
| 12 import 'package:front_end/physical_file_system.dart'; | 13 import 'package:front_end/physical_file_system.dart'; |
| 13 import 'package:path/path.dart' as p; | 14 import 'package:path/path.dart' as p; |
| 14 import 'package:test/test.dart'; | 15 import 'package:test/test.dart'; |
| 15 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 16 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 16 | 17 |
| 17 main() { | 18 main() { |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 200 |
| 200 class _BaseTest { | 201 class _BaseTest { |
| 201 io.Directory tempDirectory; | 202 io.Directory tempDirectory; |
| 202 String tempPath; | 203 String tempPath; |
| 203 | 204 |
| 204 setUp() { | 205 setUp() { |
| 205 tempDirectory = io.Directory.systemTemp.createTempSync('test_file_system'); | 206 tempDirectory = io.Directory.systemTemp.createTempSync('test_file_system'); |
| 206 tempPath = tempDirectory.absolute.path; | 207 tempPath = tempDirectory.absolute.path; |
| 207 } | 208 } |
| 208 | 209 |
| 209 tearDown() { | 210 tearDown() async { |
| 210 tempDirectory.deleteSync(recursive: true); | 211 try { |
| 212 tempDirectory.deleteSync(recursive: true); |
| 213 } on io.FileSystemException { |
| 214 // Sometimes on Windows the delete fails with errno 32 |
| 215 // (ERROR_SHARING_VIOLATION: The process cannot access the file because it |
| 216 // is being used by another process). Wait 1 second and try again. |
| 217 await new Future.delayed(new Duration(seconds: 1)); |
| 218 tempDirectory.deleteSync(recursive: true); |
| 219 } |
| 211 } | 220 } |
| 212 } | 221 } |
| OLD | NEW |