Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: pkg/watcher/test/utils.dart

Issue 107403002: Add debugging prints to the Mac OS directory watcher. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/watcher/test/directory_watcher/mac_os_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/watcher/test/utils.dart
diff --git a/pkg/watcher/test/utils.dart b/pkg/watcher/test/utils.dart
index 567bdb22102cf455d0fd43fa81ec94dfac1bea86..a7bd9b636234ba849a44155b07f6ff62a9f75a6a 100644
--- a/pkg/watcher/test/utils.dart
+++ b/pkg/watcher/test/utils.dart
@@ -15,6 +15,9 @@ import 'package:watcher/watcher.dart';
import 'package:watcher/src/stat.dart';
import 'package:watcher/src/utils.dart';
+// TODO(nweiz): remove this when issue 15042 is fixed.
+import 'package:watcher/src/directory_watcher/mac_os.dart';
+
/// The path to the temporary sandbox created for each test. All file
/// operations are implicitly relative to this directory.
String _sandboxDir;
@@ -115,6 +118,11 @@ Stream _watcherEvents;
///
/// If [dir] is provided, watches a subdirectory in the sandbox with that name.
void startWatcher({String dir}) {
+ var testCase = currentTestCase.description;
+ if (MacOSDirectoryWatcher.logDebugInfo) {
+ print("starting watcher for $testCase");
+ }
+
// We want to wait until we're ready *after* we subscribe to the watcher's
// events.
_watcher = createWatcher(dir: dir, waitForReady: false);
@@ -128,6 +136,10 @@ void startWatcher({String dir}) {
onError: currentSchedule.signalError);
currentSchedule.onComplete.schedule(() {
+ if (MacOSDirectoryWatcher.logDebugInfo) {
+ print("stopping watcher for $testCase");
+ }
+
var numEvents = _nextEvent;
subscription.cancel();
_nextEvent = 0;
« no previous file with comments | « pkg/watcher/test/directory_watcher/mac_os_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698