Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
14145a4e
Commit
14145a4e
authored
Dec 10, 2019
by
Ian Hickson
Committed by
Flutter GitHub Bot
Dec 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try re-enabling all these tests. (#46615)
parent
eb7a4a5e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
104 additions
and
107 deletions
+104
-107
exception_handling_expectation.txt
...ted_tests/flutter_test/exception_handling_expectation.txt
+4
-2
test_test.dart
...lutter_tools/test/commands.shard/permeable/test_test.dart
+100
-105
No files found.
dev/automated_tests/flutter_test/exception_handling_expectation.txt
View file @
14145a4e
...
...
@@ -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]+\)
...
...
packages/flutter_tools/test/commands.shard/permeable/test_test.dart
View file @
14145a4e
...
...
@@ -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,124 +18,117 @@ 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'
);
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
{
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
{
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
{
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
(
'flutter test should not have extraneous error messages'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
return
_testFile
(
'trivial_widget'
,
automatedTestsDirectory
,
flutterTestDirectory
,
exitCode:
isZero
);
});
testUsingContext
(
'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
(
'flutter test should report nice errors for exceptions thrown within testWidgets()
'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
return
_testFile
(
'exception_handling
'
,
automatedTestsDirectory
,
flutterTestDirectory
);
});
testUsingContext
(
'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
(
'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
);
});
testUsingContext
(
'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
(
'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
);
});
testUsingContext
(
'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
(
'flutter test should report a nice error when a Ticker is left running'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
return
_testFile
(
'ticker'
,
automatedTestsDirectory
,
flutterTestDirectory
);
});
testUsingContext
(
'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
(
'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
);
});
testUsingContext
(
'report correct
created widget caused the error'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
return
_testFile
(
'print_correct_local_widget
'
,
automatedTestsDirectory
,
flutterTestDirectory
,
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
(
'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
(
'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'
]);
});
testUsingContext
(
'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'
]);
if
(!(
result
.
stdout
as
String
).
contains
(
'+1: All tests passed'
))
{
fail
(
'unexpected output from test:
\n\n
${result.stdout}
\n
-- end stdout --
\n\n
'
);
}
expect
(
result
.
exitCode
,
0
);
});
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'
]);
});
testUsingContext
(
'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'
]);
if
(!(
result
.
stdout
as
String
).
contains
(
'+1: All tests passed'
))
{
fail
(
'unexpected output from test:
\n\n
${result.stdout}
\n
-- end stdout --
\n\n
'
);
}
expect
(
result
.
exitCode
,
0
);
});
testUsingContext
(
'flutter test should can load assets within its own package'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
return
_testFile
(
'package_assets'
,
automatedTestsDirectory
,
flutterTestDirectory
,
exitCode:
isZero
);
});
testUsingContext
(
'test runs to completion'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
final
ProcessResult
result
=
await
_runFlutterTest
(
'trivial'
,
automatedTestsDirectory
,
flutterTestDirectory
,
extraArguments:
const
<
String
>[
'--verbose'
]);
final
String
stdout
=
result
.
stdout
as
String
;
if
((!
stdout
.
contains
(
'+1: All tests passed'
))
||
(!
stdout
.
contains
(
'test 0: starting shell process'
))
||
(!
stdout
.
contains
(
'test 0: deleting temporary directory'
))
||
(!
stdout
.
contains
(
'test 0: finished'
))
||
(!
stdout
.
contains
(
'test package returned with exit code 0'
)))
{
fail
(
'unexpected output from test:
\n\n
${result.stdout}
\n
-- end stdout --
\n\n
'
);
}
if
((
result
.
stderr
as
String
).
isNotEmpty
)
{
fail
(
'unexpected error output from test:
\n\n
${result.stderr}
\n
-- end stderr --
\n\n
'
);
}
expect
(
result
.
exitCode
,
0
);
});
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'
]);
if
(!(
result
.
stdout
as
String
).
contains
(
'+1: All tests passed'
))
{
fail
(
'unexpected output from test:
\n\n
${result.stdout}
\n
-- end stdout --
\n\n
'
);
}
expect
(
result
.
exitCode
,
0
);
});
testUsingContext
(
'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'
]);
final
String
stdout
=
result
.
stdout
as
String
;
if
((!
stdout
.
contains
(
'+2: All tests passed'
))
||
(!
stdout
.
contains
(
'test 0: starting shell process'
))
||
(!
stdout
.
contains
(
'test 0: deleting temporary directory'
))
||
(!
stdout
.
contains
(
'test 0: finished'
))
||
(!
stdout
.
contains
(
'test package returned with exit code 0'
)))
{
fail
(
'unexpected output from test:
\n\n
${result.stdout}
\n
-- end stdout --
\n\n
'
);
}
if
((
result
.
stderr
as
String
).
isNotEmpty
)
{
fail
(
'unexpected error output from test:
\n\n
${result.stderr}
\n
-- end stderr --
\n\n
'
);
}
expect
(
result
.
exitCode
,
0
);
});
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'
]);
if
(!(
result
.
stdout
as
String
).
contains
(
'+1: All tests passed'
))
{
fail
(
'unexpected output from test:
\n\n
${result.stdout}
\n
-- end stdout --
\n\n
'
);
}
expect
(
result
.
exitCode
,
0
);
});
testUsingContext
(
'flutter test should test runs to completion'
,
()
async
{
Cache
.
flutterRoot
=
'../..'
;
final
ProcessResult
result
=
await
_runFlutterTest
(
'trivial'
,
automatedTestsDirectory
,
flutterTestDirectory
,
extraArguments:
const
<
String
>[
'--verbose'
]);
final
String
stdout
=
result
.
stdout
as
String
;
if
((!
stdout
.
contains
(
'+1: All tests passed'
))
||
(!
stdout
.
contains
(
'test 0: starting shell process'
))
||
(!
stdout
.
contains
(
'test 0: deleting temporary directory'
))
||
(!
stdout
.
contains
(
'test 0: finished'
))
||
(!
stdout
.
contains
(
'test package returned with exit code 0'
)))
{
fail
(
'unexpected output from test:
\n\n
${result.stdout}
\n
-- end stdout --
\n\n
'
);
}
if
((
result
.
stderr
as
String
).
isNotEmpty
)
{
fail
(
'unexpected error output from test:
\n\n
${result.stderr}
\n
-- end stderr --
\n\n
'
);
}
expect
(
result
.
exitCode
,
0
);
});
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'
]);
final
String
stdout
=
result
.
stdout
as
String
;
if
((!
stdout
.
contains
(
'+2: All tests passed'
))
||
(!
stdout
.
contains
(
'test 0: starting shell process'
))
||
(!
stdout
.
contains
(
'test 0: deleting temporary directory'
))
||
(!
stdout
.
contains
(
'test 0: finished'
))
||
(!
stdout
.
contains
(
'test package returned with exit code 0'
)))
{
fail
(
'unexpected output from test:
\n\n
${result.stdout}
\n
-- end stdout --
\n\n
'
);
}
if
((
result
.
stderr
as
String
).
isNotEmpty
)
{
fail
(
'unexpected error output from test:
\n\n
${result.stderr}
\n
-- end stderr --
\n\n
'
);
}
expect
(
result
.
exitCode
,
0
);
});
}
...
...
@@ -269,6 +262,8 @@ Future<ProcessResult> _runFlutterTest(
fs
.
path
.
join
(
dartSdkPath
,
'bin'
,
'dart'
),
args
,
workingDirectory:
workingDirectory
,
stdoutEncoding:
utf8
,
stderrEncoding:
utf8
,
);
}
finally
{
_testExclusionLock
=
null
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment