mirror of
https://github.com/flutter/flutter
synced 2024-09-20 00:32:02 +00:00
add driver failure test (#6776)
This commit is contained in:
parent
690ec45095
commit
d63430773c
|
@ -22,6 +22,7 @@ flutter analyze --flutter-repo
|
|||
# verify that the tests actually return failure on failure and success on success
|
||||
(cd dev/automated_tests; ! flutter test test_smoke_test/fail_test.dart > /dev/null)
|
||||
(cd dev/automated_tests; flutter test test_smoke_test/pass_test.dart > /dev/null)
|
||||
(cd packages/flutter_driver; ! flutter drive --use-existing-app -t test_driver/failure.dart >/dev/null 2>&1)
|
||||
|
||||
COVERAGE_FLAG=
|
||||
if [ -n "$TRAVIS" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
|
||||
|
|
7
packages/flutter_driver/test_driver/failure.dart
Normal file
7
packages/flutter_driver/test_driver/failure.dart
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
void main() {
|
||||
// Dummy. Only needed because driver needs an entry point.
|
||||
}
|
9
packages/flutter_driver/test_driver/failure_test.dart
Normal file
9
packages/flutter_driver/test_driver/failure_test.dart
Normal file
|
@ -0,0 +1,9 @@
|
|||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
void main() {
|
||||
// Intentionally fail the test. We want to see driver return a non-zero exit
|
||||
// code when this happens.
|
||||
throw 'Failed';
|
||||
}
|
Loading…
Reference in a new issue