Index: pkg/kernel/test/baseline_tester.dart |
diff --git a/pkg/kernel/test/baseline_tester.dart b/pkg/kernel/test/baseline_tester.dart |
index c2c47e584d58befdd8d80824f04ab120ca55ade8..b954e20197a40f31e39d252b4a42b04a599d87b6 100644 |
--- a/pkg/kernel/test/baseline_tester.dart |
+++ b/pkg/kernel/test/baseline_tester.dart |
@@ -4,6 +4,7 @@ |
import 'dart:io'; |
import 'package:kernel/analyzer/loader.dart'; |
+import 'package:kernel/application_root.dart'; |
import 'package:kernel/kernel.dart'; |
import 'package:kernel/target/targets.dart'; |
import 'package:kernel/text/ast_to_text.dart'; |
@@ -30,11 +31,13 @@ void runBaselineTests(String folderName, TestTarget target) { |
String outputDirectory = '$testcaseDirectory/$folderName'; |
var batch = new DartLoaderBatch(); |
Directory directory = new Directory(inputDirectory); |
+ var applicationRoot = new ApplicationRoot(directory.absolute.path); |
for (FileSystemEntity file in directory.listSync()) { |
if (file is File && file.path.endsWith('.dart')) { |
String name = pathlib.basename(file.path); |
test(name, () async { |
- String dartPath = file.path; |
+ Uri dartPath = |
+ new Uri(scheme: 'file', path: pathlib.absolute(file.path)); |
String shortName = pathlib.withoutExtension(name); |
String filenameOfBaseline = '$outputDirectory/$shortName.baseline.txt'; |
String filenameOfCurrent = '$outputDirectory/$shortName.current.txt'; |
@@ -45,7 +48,8 @@ void runBaselineTests(String folderName, TestTarget target) { |
new DartOptions( |
strongMode: target.strongMode, |
sdk: sdkDirectory, |
- declaredVariables: target.extraDeclaredVariables)); |
+ declaredVariables: target.extraDeclaredVariables, |
+ applicationRoot: applicationRoot)); |
var program = loader.loadProgram(dartPath, target: target); |
verifyProgram(program); |
var errors = target.transformProgram(program); |