Migration: change how migration_cli_test checks for a correct SDK.

When tests are run internally under bazel, there's no `version` file
we can look for to verify that we are looking at an SDK directory.
Looking for a `bin` directory works equally well.

Change-Id: Ib19350eaf90d105ebaa3d197fb45b5a41a10179d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150285
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
Paul Berry 2020-06-08 16:47:16 +00:00 committed by commit-bot@chromium.org
parent 87300e9081
commit b7abe2cf00

View file

@ -1109,7 +1109,7 @@ int f() => null;
var cli = MigrationCli(binaryName: 'nnbd_migration');
cli.decodeCommandLineArgs(_parseArgs([]));
expect(
File(path.join(cli.options.sdkPath, 'version')).existsSync(), isTrue);
Directory(path.join(cli.options.sdkPath, 'bin')).existsSync(), isTrue);
}
test_option_sdk_hidden() async {