Fix tests (#3977)
Also, make sure that broken tests actually break the bots. And add a test to make sure that keeps happening.
This commit is contained in:
9
dev/automated_tests/.gitignore
vendored
Normal file
9
dev/automated_tests/.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
.atom
|
||||
.DS_Store
|
||||
.buildlog
|
||||
.idea
|
||||
.packages
|
||||
.pub/
|
||||
build/
|
||||
packages
|
||||
pubspec.lock
|
||||
2
dev/automated_tests/README.md
Normal file
2
dev/automated_tests/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
This is a fake package for use by automated testing.
|
||||
For example, the `flutter_tools` package uses this to test `flutter test`.
|
||||
1
dev/automated_tests/flutter.yaml
Normal file
1
dev/automated_tests/flutter.yaml
Normal file
@@ -0,0 +1 @@
|
||||
uses-material-design: true
|
||||
6
dev/automated_tests/pubspec.yaml
Normal file
6
dev/automated_tests/pubspec.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
name: flutter_automated_tests
|
||||
dependencies:
|
||||
flutter:
|
||||
path: ../../packages/flutter
|
||||
flutter_test:
|
||||
path: ../../packages/flutter_test
|
||||
2
dev/automated_tests/test_smoke_test/README.md
Normal file
2
dev/automated_tests/test_smoke_test/README.md
Normal file
@@ -0,0 +1,2 @@
|
||||
This directory is used by ///flutter/travis/test.sh to verify that
|
||||
`flutter test` actually correctly fails when a test fails.
|
||||
14
dev/automated_tests/test_smoke_test/fail_test.dart
Normal file
14
dev/automated_tests/test_smoke_test/fail_test.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
// 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.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
// this is a test to make sure our tests actually catch failures
|
||||
// see ///flutter/travis/test.sh
|
||||
|
||||
void main() {
|
||||
test('test smoke test -- this test SHOULD FAIL', () async {
|
||||
expect(false, isTrue);
|
||||
});
|
||||
}
|
||||
14
dev/automated_tests/test_smoke_test/pass_test.dart
Normal file
14
dev/automated_tests/test_smoke_test/pass_test.dart
Normal file
@@ -0,0 +1,14 @@
|
||||
// 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.
|
||||
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
// this is a test to make sure our tests actually catch failures
|
||||
// see ///flutter/travis/test.sh
|
||||
|
||||
void main() {
|
||||
test('test smoke test -- this test should pass', () async {
|
||||
expect(true, isTrue);
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user