Commit 14145a4e authored by Ian Hickson's avatar Ian Hickson Committed by Flutter GitHub Bot

Try re-enabling all these tests. (#46615)

parent eb7a4a5e
......@@ -5,8 +5,8 @@ Who lives, who dies, who tells your story\?
When the exception was thrown, this was the stack:
#0 main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:10:5\)
<asynchronous suspension>
#1 .+ \(package:flutter_test[/\\]src[/\\]widget_tester\.dart:[0-9]+:[0-9]+\)
<asynchronous suspension>
<<skip until matching line>>
^\(elided [0-9]+ frames.+$
<<skip until matching line>>
......@@ -24,8 +24,8 @@ Who lives, who dies, who tells your story\?
When the exception was thrown, this was the stack:
#0 main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:13:5\)
<asynchronous suspension>
#1 .+ \(package:flutter_test[/\\]src[/\\]widget_tester\.dart:[0-9]+:[0-9]+\)
<asynchronous suspension>
<<skip until matching line>>
^\(elided [0-9]+ .+$
<<skip until matching line>>
......@@ -43,6 +43,8 @@ Who lives, who dies, who tells your story\?
When the exception was thrown, this was the stack:
#[0-9]+ +main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]flutter_test[/\\]exception_handling_test\.dart:15:105\)
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]widget_tester\.dart:[0-9]+:[0-9]+\)
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
#[0-9]+ +.+ \(package:flutter_test[/\\]src[/\\]binding.dart:[0-9]+:[0-9]+\)
......
......@@ -3,7 +3,7 @@
// found in the LICENSE file.
import 'dart:async';
import 'dart:io' as io;
import 'dart:convert';
import 'package:flutter_tools/src/base/file_system.dart';
import 'package:flutter_tools/src/base/io.dart';
......@@ -18,69 +18,64 @@ import '../../src/context.dart';
Future<void> _testExclusionLock;
void main() {
group('flutter test should', () {
final String automatedTestsDirectory = fs.path.join('..', '..', 'dev', 'automated_tests');
final String flutterTestDirectory = fs.path.join(automatedTestsDirectory, 'flutter_test');
testUsingContext('not have extraneous error messages', () async {
testUsingContext('flutter test should not have extraneous error messages', () async {
Cache.flutterRoot = '../..';
return _testFile('trivial_widget', automatedTestsDirectory, flutterTestDirectory, exitCode: isZero);
}, skip: io.Platform.isLinux); // Flutter on Linux sometimes has problems with font resolution (#7224)
});
testUsingContext('report nice errors for exceptions thrown within testWidgets()', () async {
testUsingContext('flutter test should report nice errors for exceptions thrown within testWidgets()', () async {
Cache.flutterRoot = '../..';
return _testFile('exception_handling', automatedTestsDirectory, flutterTestDirectory);
}, skip: true); // https://github.com/flutter/flutter/issues/46142
// Note: was skip: skip: io.Platform.isWindows
// TODO(chunhtai): Remove Skip https://github.com/flutter/flutter/issues/35425.
});
testUsingContext('report a nice error when a guarded function was called without await', () async {
testUsingContext('flutter test should report a nice error when a guarded function was called without await', () async {
Cache.flutterRoot = '../..';
return _testFile('test_async_utils_guarded', automatedTestsDirectory, flutterTestDirectory);
}, skip: io.Platform.isWindows); // TODO(chunhtai): Remove Skip https://github.com/flutter/flutter/issues/35425.
});
testUsingContext('report a nice error when an async function was called without await', () async {
testUsingContext('flutter test should report a nice error when an async function was called without await', () async {
Cache.flutterRoot = '../..';
return _testFile('test_async_utils_unguarded', automatedTestsDirectory, flutterTestDirectory);
}, skip: io.Platform.isWindows); // TODO(chunhtai): Remove Skip https://github.com/flutter/flutter/issues/35425.
});
testUsingContext('report a nice error when a Ticker is left running', () async {
testUsingContext('flutter test should report a nice error when a Ticker is left running', () async {
Cache.flutterRoot = '../..';
return _testFile('ticker', automatedTestsDirectory, flutterTestDirectory);
}, skip: io.Platform.isWindows); // TODO(chunhtai): Remove Skip https://github.com/flutter/flutter/issues/35425.
});
testUsingContext('report a nice error when a pubspec.yaml is missing a flutter_test dependency', () async {
testUsingContext('flutter test should report a nice error when a pubspec.yaml is missing a flutter_test dependency', () async {
final String missingDependencyTests = fs.path.join('..', '..', 'dev', 'missing_dependency_tests');
Cache.flutterRoot = '../..';
return _testFile('trivial', missingDependencyTests, missingDependencyTests);
}, skip: io.Platform.isWindows); // TODO(chunhtai): Remove Skip https://github.com/flutter/flutter/issues/35425.
});
testUsingContext('report which user created widget caused the error', () async {
testUsingContext('flutter test should report which user created widget caused the error', () async {
Cache.flutterRoot = '../..';
return _testFile('print_user_created_ancestor', automatedTestsDirectory, flutterTestDirectory,
extraArguments: const <String>['--track-widget-creation']);
}, skip: io.Platform.isWindows); // TODO(chunhtai): Remove Skip https://github.com/flutter/flutter/issues/35425.
});
testUsingContext('report which user created widget caused the error - no flag', () async {
testUsingContext('flutter test should report which user created widget caused the error - no flag', () async {
Cache.flutterRoot = '../..';
return _testFile('print_user_created_ancestor_no_flag', automatedTestsDirectory, flutterTestDirectory,
extraArguments: const <String>['--no-track-widget-creation']);
}, skip: io.Platform.isWindows); // TODO(chunhtai): Remove Skip https://github.com/flutter/flutter/issues/35425.
});
testUsingContext('report correct created widget caused the error', () async {
testUsingContext('flutter test should report correct created widget caused the error', () async {
Cache.flutterRoot = '../..';
return _testFile('print_correct_local_widget', automatedTestsDirectory, flutterTestDirectory,
extraArguments: const <String>['--track-widget-creation']);
}, skip: io.Platform.isWindows); // TODO(chunhtai): Remove Skip https://github.com/flutter/flutter/issues/35425.
});
testUsingContext('can load assets within its own package', () async {
testUsingContext('flutter test should can load assets within its own package', () async {
Cache.flutterRoot = '../..';
return _testFile('package_assets', automatedTestsDirectory, flutterTestDirectory, exitCode: isZero);
}, skip: true); // https://github.com/flutter/flutter/issues/46142
// Note, was skip: io.Platform.isWindows
});
testUsingContext('run a test when its name matches a regexp', () async {
testUsingContext('flutter test should run a test when its name matches a regexp', () async {
Cache.flutterRoot = '../..';
final ProcessResult result = await _runFlutterTest('filtering', automatedTestsDirectory, flutterTestDirectory,
extraArguments: const <String>['--name', 'inc.*de']);
......@@ -90,7 +85,7 @@ void main() {
expect(result.exitCode, 0);
});
testUsingContext('run a test when its name contains a string', () async {
testUsingContext('flutter test should run a test when its name contains a string', () async {
Cache.flutterRoot = '../..';
final ProcessResult result = await _runFlutterTest('filtering', automatedTestsDirectory, flutterTestDirectory,
extraArguments: const <String>['--plain-name', 'include']);
......@@ -100,7 +95,7 @@ void main() {
expect(result.exitCode, 0);
});
testUsingContext('test runs to completion', () async {
testUsingContext('flutter test should test runs to completion', () async {
Cache.flutterRoot = '../..';
final ProcessResult result = await _runFlutterTest('trivial', automatedTestsDirectory, flutterTestDirectory,
extraArguments: const <String>['--verbose']);
......@@ -118,7 +113,7 @@ void main() {
expect(result.exitCode, 0);
});
testUsingContext('run all tests inside of a directory with no trailing slash', () async {
testUsingContext('flutter test should run all tests inside of a directory with no trailing slash', () async {
Cache.flutterRoot = '../..';
final ProcessResult result = await _runFlutterTest(null, automatedTestsDirectory, flutterTestDirectory + '/child_directory',
extraArguments: const <String>['--verbose']);
......@@ -135,8 +130,6 @@ void main() {
}
expect(result.exitCode, 0);
});
});
}
Future<void> _testFile(
......@@ -269,6 +262,8 @@ Future<ProcessResult> _runFlutterTest(
fs.path.join(dartSdkPath, 'bin', 'dart'),
args,
workingDirectory: workingDirectory,
stdoutEncoding: utf8,
stderrEncoding: utf8,
);
} finally {
_testExclusionLock = null;
......
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