diff --git a/bin/flutter b/bin/flutter index 87708ccdb6..c2c736aa8c 100755 --- a/bin/flutter +++ b/bin/flutter @@ -65,8 +65,10 @@ if [ ! -d "$FLUTTER_ROOT/.git" ]; then exit 1 fi +FLUTTER_TOOL_ARGS="--checked" + # To debug the tool, you can uncomment the following line to enable checked mode and set an observatory port: -# FLUTTER_TOOL_ARGS="--observe=65432 --checked" +# FLUTTER_TOOL_ARGS="$FLUTTER_TOOL_ARGS --observe=65432" ( if hash flock 2>/dev/null; then diff --git a/bin/flutter.bat b/bin/flutter.bat index 99d825f6e5..43e082d84b 100644 --- a/bin/flutter.bat +++ b/bin/flutter.bat @@ -39,8 +39,10 @@ IF NOT EXIST "%flutter_root%\.git" ( REM Ensure that bin/cache exists. IF NOT EXIST "%cache_dir%" MKDIR "%cache_dir%" +SET FLUTTER_TOOL_ARGS="--checked" + REM To debug the tool, you can uncomment the following line to enable checked mode and set an observatory port: -REM SET FLUTTER_TOOL_ARGS="--observe=65432 --checked" +REM SET FLUTTER_TOOL_ARGS="%FLUTTER_TOOL_ARGS% --observe=65432" :acquire_lock 2>NUL ( diff --git a/packages/flutter_tools/lib/src/commands/test.dart b/packages/flutter_tools/lib/src/commands/test.dart index 91de53fd90..a23a0f2a86 100644 --- a/packages/flutter_tools/lib/src/commands/test.dart +++ b/packages/flutter_tools/lib/src/commands/test.dart @@ -172,7 +172,7 @@ class TestCommand extends FlutterCommand { workDir = fs.directory('test'); if (!workDir.existsSync()) throwToolExit('Test directory "${workDir.path}" not found.'); - files = _findTests(workDir); + files = _findTests(workDir).toList(); if (files.isEmpty) { throwToolExit( 'Test directory "${workDir.path}" does not appear to contain any test files.\n'