Index: pkg/analyzer_plugin/tool/spec/check_all_test.dart |
diff --git a/pkg/analyzer_plugin/tool/spec/check_all_test.dart b/pkg/analyzer_plugin/tool/spec/check_all_test.dart |
index 3625eb59c0e6bde210e5e8a16ea632cd6b584062..db9d2e5a3e2bce43617ddeb7f4536a84134a37af 100644 |
--- a/pkg/analyzer_plugin/tool/spec/check_all_test.dart |
+++ b/pkg/analyzer_plugin/tool/spec/check_all_test.dart |
@@ -15,6 +15,9 @@ import 'generate_all.dart'; |
*/ |
main() { |
String script = Platform.script.toFilePath(windows: Platform.isWindows); |
- String pkgPath = normalize(join(dirname(script), '..', '..')); |
- GeneratedContent.checkAll(pkgPath, 'tool/spec/generate_all.dart', allTargets); |
+ List<String> components = split(script); |
+ int index = components.indexOf('analyzer_plugin'); |
+ String pkgPath = joinAll(components.sublist(0, index + 1)); |
+ GeneratedContent.checkAll( |
+ pkgPath, join('tool', 'spec', 'generate_all.dart'), allTargets); |
} |