diff --git a/dev/bots/test.sh b/dev/bots/test.sh index 0ae9f9d627..52415f0951 100755 --- a/dev/bots/test.sh +++ b/dev/bots/test.sh @@ -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 diff --git a/packages/flutter_driver/test_driver/failure.dart b/packages/flutter_driver/test_driver/failure.dart new file mode 100644 index 0000000000..6494a6c7d0 --- /dev/null +++ b/packages/flutter_driver/test_driver/failure.dart @@ -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. +} diff --git a/packages/flutter_driver/test_driver/failure_test.dart b/packages/flutter_driver/test_driver/failure_test.dart new file mode 100644 index 0000000000..436d0c1a43 --- /dev/null +++ b/packages/flutter_driver/test_driver/failure_test.dart @@ -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'; +}