Fix integration hot-reload test on mac. (#21741)

Underlying issue with breakpoint was that /var path is a symlink to a /private/var on mac. Because of that breakpoint could not be resolved.
This commit is contained in:
Alexander Aprelev 2018-09-12 22:35:21 -07:00 committed by GitHub
parent 23499f4004
commit d61b48b75d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 6 deletions

View file

@ -49,10 +49,6 @@ void main() {
Uri.file(_project.breakpointFile).toString(),
_project.breakpointLine);
expect(isolate.pauseEvent, isInstanceOf<VMPauseBreakpointEvent>());
// TODO(dantup): Unskip for Mac when [1] is fixed.
// [1] hot reload/breakpoints fail when uris prefixed with file://
// https://github.com/flutter/flutter/issues/18441
}, skip: !platform.isLinux && !platform.isWindows);
});
}, timeout: const Timeout.factor(6));
}

View file

@ -16,7 +16,8 @@ abstract class TestProject {
String get main;
// Valid locations for a breakpoint for tests that just need to break somewhere.
String get breakpointFile => fs.path.join(dir.path, 'lib', 'main.dart');
String get breakpointFile => fs.file(fs.path.join(
dir.path, 'lib', 'main.dart')).resolveSymbolicLinksSync();
int get breakpointLine => lineContaining(main, '// BREAKPOINT');
Future<void> setUpIn(Directory dir) async {