This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add DDC test coverage, enable skipped tests. (#83)
* Add DDC test coverage, enable tests. * chmod +x. * Fix crash. * Dartfmt.
- Loading branch information
1 parent
cb46a69
commit ad07511
Showing
13 changed files
with
163 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
.DS_Store | ||
.idea | ||
.pub/ | ||
.dart_tool/ | ||
.settings/ | ||
build/ | ||
packages | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,54 @@ | ||
|
||
language: dart | ||
|
||
dart: | ||
- dev | ||
# Gives more resources on Travis (8GB Ram, 2 CPUs). | ||
# Do not remove without verifying w/ Travis. | ||
sudo: required | ||
addons: | ||
chrome: stable | ||
|
||
# Build stages: https://docs.travis-ci.com/user/build-stages/. | ||
stages: | ||
- presubmit | ||
- build | ||
- testing | ||
|
||
dart_task: | ||
- test: --platform vm | ||
- test: --platform firefox -j 1 | ||
- dartanalyzer | ||
- dartfmt | ||
# 1. Run dartfmt, dartanalyzer, pub run test (VM). | ||
# 2. Then run a build. | ||
# 3. Then run tests compiled via dartdevc and dart2js. | ||
jobs: | ||
include: | ||
- stage: presubmit | ||
script: ./tool/travis.sh dartfmt | ||
dart: dev | ||
- stage: presubmit | ||
script: ./tool/travis.sh dartanalyzer | ||
dart: dev | ||
- stage: build | ||
script: ./tool/travis.sh dartdevc_build | ||
dart: dev | ||
- stage: testing | ||
script: ./tool/travis.sh vm_test | ||
dart: dev | ||
- stage: testing | ||
script: ./tool/travis.sh dartdevc_test | ||
dart: dev | ||
- stage: testing | ||
script: ./tool/travis.sh dart2js_test | ||
dart: dev | ||
|
||
# Only building master means that we don't run two builds for each pull request. | ||
branches: | ||
only: [master] | ||
|
||
# Incremental pub cache and builds. | ||
cache: | ||
directories: | ||
- $HOME/.pub-cache | ||
- .dart_tool | ||
|
||
# Necessary for Chrome and Firefox to run | ||
before_install: | ||
- export DISPLAY=:99.0 | ||
- sh -e /etc/init.d/xvfb start | ||
- "t=0; until (xdpyinfo -display :99 &> /dev/null || test $t -gt 10); do sleep 1; let t=$t+1; done" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
presets: | ||
# When run with -P travis, we have different settings/options. | ||
# | ||
# 1: We don't use Chrome --headless: | ||
# 2: We use --reporter expanded | ||
# 3: We skip anything tagged "fails-on-travis". | ||
travis: | ||
# TODO(https://github.com/dart-lang/test/issues/772) | ||
override_platforms: | ||
chrome: | ||
settings: | ||
headless: false | ||
|
||
# Don't run any tests that are tagged ["fails-on-travis"]. | ||
exclude_tags: "fails-on-travis" | ||
|
||
# https://github.com/dart-lang/test/blob/master/doc/configuration.md#reporter | ||
reporter: expanded | ||
|
||
platforms: | ||
- chrome | ||
- vm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# Copyright 2018 the Dart project authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
#!/bin/bash | ||
|
||
if [ "$#" == "0" ]; then | ||
echo -e '\033[31mAt least one task argument must be provided!\033[0m' | ||
exit 1 | ||
fi | ||
|
||
EXIT_CODE=0 | ||
|
||
while (( "$#" )); do | ||
TASK=$1 | ||
case $TASK in | ||
dartfmt) echo | ||
echo -e '\033[1mTASK: dartfmt\033[22m' | ||
echo -e 'dartfmt -n --set-exit-if-changed .' | ||
dartfmt -n --set-exit-if-changed . || EXIT_CODE=$? | ||
;; | ||
dartanalyzer) echo | ||
echo -e '\033[1mTASK: dartanalyzer\033[22m' | ||
echo -e 'dartanalyzer --fatal-warnings .' | ||
dartanalyzer --fatal-warnings . || EXIT_CODE=$? | ||
;; | ||
vm_test) echo | ||
echo -e '\033[1mTASK: vm_test\033[22m' | ||
echo -e 'pub run test -P travis -p vm -x requires-dart2' | ||
pub run test -p vm || EXIT_CODE=$? | ||
;; | ||
dartdevc_build) echo | ||
echo -e '\033[1mTASK: build\033[22m' | ||
echo -e 'pub run build_runner build --fail-on-severe' | ||
pub run build_runner build --fail-on-severe || EXIT_CODE=$? | ||
;; | ||
dartdevc_test) echo | ||
echo -e '\033[1mTASK: dartdevc_test\033[22m' | ||
echo -e 'pub run build_runner test -- -P travis -p chrome' | ||
pub run build_runner test -- -p chrome || EXIT_CODE=$? | ||
;; | ||
dart2js_test) echo | ||
echo -e '\033[1mTASK: dart2js_test\033[22m' | ||
echo -e 'pub run test -P travis -p chrome -x requires-dart2' | ||
pub run test -p chrome || EXIT_CODE=$? | ||
;; | ||
*) echo -e "\033[31mNot expecting TASK '${TASK}'. Error!\033[0m" | ||
EXIT_CODE=1 | ||
;; | ||
esac | ||
|
||
shift | ||
done | ||
|
||
exit $EXIT_CODE |