add driver failure test (#6776)

This commit is contained in:
Yegor 2016-11-09 15:28:30 -08:00 committed by GitHub
parent 690ec45095
commit d63430773c
3 changed files with 17 additions and 0 deletions

View file

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

View 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.
}

View 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';
}