Commit 5ff2b1a1 authored by Devon Carew's avatar Devon Carew

Merge pull request #1444 from devoncarew/work_on_test

test command checks for test dir
parents 5b2005d4 c46ad29c
...@@ -8,7 +8,6 @@ import 'dart:io'; ...@@ -8,7 +8,6 @@ import 'dart:io';
import 'package:args/command_runner.dart'; import 'package:args/command_runner.dart';
import 'package:stack_trace/stack_trace.dart'; import 'package:stack_trace/stack_trace.dart';
import 'src/base/context.dart';
import 'src/base/process.dart'; import 'src/base/process.dart';
import 'src/commands/analyze.dart'; import 'src/commands/analyze.dart';
import 'src/commands/apk.dart'; import 'src/commands/apk.dart';
...@@ -70,7 +69,8 @@ Future main(List<String> args) async { ...@@ -70,7 +69,8 @@ Future main(List<String> args) async {
// We've caught an exit code. // We've caught an exit code.
exit(error.exitCode); exit(error.exitCode);
} else { } else {
printError(error, chain.terse.toTrace()); stderr.writeln(error);
stderr.writeln(chain.terse);
exit(1); exit(1);
} }
}); });
......
...@@ -90,8 +90,14 @@ class TestCommand extends FlutterCommand { ...@@ -90,8 +90,14 @@ class TestCommand extends FlutterCommand {
Directory testDir = runFlutterTests ? _flutterUnitTestDir : _currentPackageTestDir; Directory testDir = runFlutterTests ? _flutterUnitTestDir : _currentPackageTestDir;
if (testArgs.isEmpty) if (testArgs.isEmpty) {
if (!testDir.existsSync()) {
printError("Test directory '${testDir.path}' not found.");
return 1;
}
testArgs.addAll(_findTests(testDir)); testArgs.addAll(_findTests(testDir));
}
testArgs.insert(0, '--'); testArgs.insert(0, '--');
if (Platform.environment['TERM'] == 'dumb') if (Platform.environment['TERM'] == 'dumb')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment