Commit c46ad29c authored by Devon Carew's avatar Devon Carew

test commands checks for test fir

parent 12419d6b
......@@ -8,7 +8,6 @@ import 'dart:io';
import 'package:args/command_runner.dart';
import 'package:stack_trace/stack_trace.dart';
import 'src/base/context.dart';
import 'src/base/process.dart';
import 'src/commands/analyze.dart';
import 'src/commands/apk.dart';
......@@ -70,7 +69,8 @@ Future main(List<String> args) async {
// We've caught an exit code.
exit(error.exitCode);
} else {
printError(error, chain.terse.toTrace());
stderr.writeln(error);
stderr.writeln(chain.terse);
exit(1);
}
});
......
......@@ -90,8 +90,14 @@ class TestCommand extends FlutterCommand {
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.insert(0, '--');
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