mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
test commands checks for test fir
This commit is contained in:
parent
12419d6bcf
commit
c46ad29cfb
@ -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')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user