[tools] remove --flutter-repo flag in `flutter test` (#3728)
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 051b1c5..a8c9cb3 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -83,7 +83,6 @@
  * `cd packages/flutter_tools`
  * `dart test/all.dart`
 
-`flutter test --flutter-repo` is a shortcut for those working on the flutter repository itself which runs all tests inside the `flutter` package regardless of the current working directory.
 To run all the tests for the entire Flutter repository, the same way that Travis runs them, run `travis/test.sh`.
 
 If you've built [your own flutter engine](#working-on-the-engine-and-the-framework-at-the-same-time), you can pass `--engine-debug` or `--engine-release` to change what flutter shell `flutter test` uses.
diff --git a/packages/flutter_tools/lib/src/commands/test.dart b/packages/flutter_tools/lib/src/commands/test.dart
index 16340e2..e9d6fff 100644
--- a/packages/flutter_tools/lib/src/commands/test.dart
+++ b/packages/flutter_tools/lib/src/commands/test.dart
@@ -11,17 +11,11 @@
 import '../artifacts.dart';
 import '../build_configuration.dart';
 import '../globals.dart';
-import '../package_map.dart';
 import '../runner/flutter_command.dart';
 import '../test/flutter_platform.dart' as loader;
 
 class TestCommand extends FlutterCommand {
   TestCommand() {
-    argParser.addFlag(
-      'flutter-repo',
-      help: 'Run tests from the \'flutter\' package in the Flutter repository instead of the current directory.',
-      defaultsTo: false
-    );
     usesPubOption();
   }
 
@@ -32,19 +26,16 @@
   String get description => 'Run Flutter unit tests for the current project (Linux only).';
 
   @override
-  bool get shouldRunPub => !argResults['flutter-repo'] && super.shouldRunPub;
-
-  @override
   bool get requiresProjectRoot => false;
 
   @override
   Validator projectRootValidator = () {
     if (!FileSystemEntity.isFileSync('pubspec.yaml')) {
-      printError('Error: No pubspec.yaml file found.\n'
-        'If you wish to run the tests in the Flutter repository\'s \'flutter\' package,\n'
-        'pass --flutter-repo before any test paths. Otherwise, run this command from the\n'
-        'root of your project. Test files must be called *_test.dart and must reside in\n'
-        'the package\'s \'test\' directory (or one of its subdirectories).');
+      printError(
+        'Error: No pubspec.yaml file found in the current working directory.\n'
+        'Run this command from the root of your project. Test files must be\n'
+        'called *_test.dart and must reside in the package\'s \'test\'\n'
+        'directory (or one of its subdirectories).');
       return false;
     }
     return true;
@@ -74,10 +65,6 @@
                     .map((FileSystemEntity entity) => path.absolute(entity.path));
   }
 
-  Directory get _flutterUnitTestDir {
-    return new Directory(path.join(ArtifactStore.flutterRoot, 'packages', 'flutter', 'test'));
-  }
-
   Directory get _currentPackageTestDir {
     // We don't scan the entire package, only the test/ subdirectory, so that
     // files with names like like "hit_test.dart" don't get run.
@@ -98,16 +85,10 @@
   Future<int> runInProject() async {
     List<String> testArgs = argResults.rest.map((String testPath) => path.absolute(testPath)).toList();
 
-    final bool runFlutterTests = argResults['flutter-repo'];
-    if (!runFlutterTests && !projectRootValidator())
+    if (!projectRootValidator())
       return 1;
 
-    // If we're running the flutter tests, we want to use the packages directory
-    // from the flutter package in order to find the proper shell binary.
-    if (runFlutterTests)
-      PackageMap.instance = new PackageMap(path.join(ArtifactStore.flutterRoot, 'packages', 'flutter', '.packages'));
-
-    Directory testDir = runFlutterTests ? _flutterUnitTestDir : _currentPackageTestDir;
+    Directory testDir = _currentPackageTestDir;
 
     if (testArgs.isEmpty) {
       if (!testDir.existsSync()) {