test commands checks for test fir

This commit is contained in:
Devon Carew
2016-01-28 13:29:17 -08:00
parent 12419d6bcf
commit c46ad29cfb
2 changed files with 9 additions and 3 deletions

View File

@@ -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')