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

Unified Diff: pkg/analyzer_cli/test/driver_test.dart

Issue 2720593002: fix failing bazel workspace relative path test (Closed)
Patch Set: Created 3 years, 10 months 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/analyzer_cli/lib/src/options.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer_cli/test/driver_test.dart
diff --git a/pkg/analyzer_cli/test/driver_test.dart b/pkg/analyzer_cli/test/driver_test.dart
index 4ff4b39a212dde09d832852e9ebfd27e0392010c..73ee9884acf1ae03ee2d496fc36a7613c7d0ae85 100644
--- a/pkg/analyzer_cli/test/driver_test.dart
+++ b/pkg/analyzer_cli/test/driver_test.dart
@@ -16,6 +16,7 @@ import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer/src/services/lint.dart';
import 'package:analyzer_cli/src/driver.dart';
import 'package:analyzer_cli/src/options.dart';
+import 'package:cli_util/cli_util.dart' show getSdkDir;
import 'package:path/path.dart' as path;
import 'package:test/test.dart';
import 'package:yaml/src/yaml_node.dart';
@@ -122,6 +123,8 @@ main() {
// Copy to temp dir so that existing analysis options
// in the test directory hierarchy do not interfere
await withTempDirAsync((String tempDirPath) async {
+ String dartSdkPath = getSdkDir(<String>[])?.path;
+ print('>>> dartSdkPath: $dartSdkPath');
await recursiveCopy(
new Directory(path.join(testDirectory, 'data', 'bazel')),
tempDirPath);
@@ -129,7 +132,16 @@ main() {
try {
Directory.current = path.join(tempDirPath, 'proj');
Driver driver = new Driver();
- await driver.start([path.join('lib', 'file.dart')]);
+ try {
+ await driver.start([
+ path.join('lib', 'file.dart'),
+ '--dart-sdk',
+ dartSdkPath,
+ ]);
+ } catch (e) {
+ print('>>>>>\n${errorSink.toString()}\n<<<<<');
+ rethrow;
+ }
expect(errorSink.toString(), isEmpty);
expect(outSink.toString(), contains('No issues found'));
expect(exitCode, 0);
« no previous file with comments | « pkg/analyzer_cli/lib/src/options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698