Skip to content

Commit 060bc55

Browse files
committed
More testing
1 parent 11db903 commit 060bc55

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

dwds/lib/src/utilities/dart_uri.dart

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,21 +168,26 @@ class DartUri {
168168
/// We store this here because for tests we may want to act as if we're
169169
/// running in the directory of a target package, even if the current
170170
/// directory of the tests is actually the main dwds directory.
171-
static String get currentDirectory => _currentDirectory;
172-
173-
// TODO(srujzs): This is temporary to debug test failures and avoid analysis
174-
// issues. Remove.
175-
static bool tmp = false;
171+
static String get currentDirectory {
172+
print('Getting current directory: $_currentDirectory');
173+
return _currentDirectory;
174+
}
176175

177176
static set currentDirectory(String newDir) {
177+
print('Setting current directory: $newDir');
178178
_currentDirectory = newDir;
179-
if (tmp) _currentDirectoryUri = '${p.toUri(newDir)}';
179+
print('Setting current directory uri: ${p.toUri(newDir)}');
180+
_currentDirectoryUri = '${p.toUri(newDir)}';
180181
}
181182

182183
static String _currentDirectoryUri = '${p.toUri(currentDirectory)}';
183184

184-
/// The current directory as a file: Uri, saved here to avoid re-computing.
185-
static String get currentDirectoryUri => _currentDirectoryUri;
185+
/// The current directory as a file: Uri, saved in a field to avoid
186+
/// re-computing.
187+
static String get currentDirectoryUri {
188+
print('Getting current directory uri: $_currentDirectoryUri');
189+
return _currentDirectoryUri;
190+
}
186191

187192
/// Record library and script uris to enable resolving library and script paths.
188193
static Future<void> initialize() async {

dwds/test/fixtures/context.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,7 @@ class TestContext {
541541
await _webDriver?.quit(closeSession: true);
542542
_chromeDriver?.kill();
543543
DartUri.currentDirectory = p.current;
544+
print('Setting currentDirectory in tearDown: ${DartUri.currentDirectory}');
544545
await _daemonClient?.close();
545546
await ddcService?.stop();
546547
await _webRunner?.stop();

test_common/lib/utilities.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ const newDdcTypeSystemVersion = '3.3.0-242.0.dev';
1616
/// '/workstation/webdev'.
1717
String get webdevPath {
1818
final pathParts = p.split(p.current);
19+
print('Path parts: $pathParts');
1920
// We expect all tests to be run from the webdev mono-repo:
20-
// TODO(srujzs): This is just to debug the failures on https://github.com/dart-lang/webdev/pull/2627.
21-
// Delete when done debugging.
22-
print(pathParts);
2321
assert(pathParts.contains(webdevDirName));
2422
return p.joinAll(
2523
pathParts.sublist(0, pathParts.lastIndexOf(webdevDirName) + 1),

0 commit comments

Comments
 (0)