blob: 7cecbfefbba6ddefdf9bbd61e63e7b516dbab9cb [file] [log] [blame]
# Copyright (c) 2020, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# Fast fail the script on failures.
set -e
# Gather coverage.
dart pub global activate remove_from_coverage
dart pub global activate coverage
# Generate coverage report.
dart --pause-isolates-on-exit --disable-service-auth-codes --enable-vm-service=3000 test/test_coverage.dart &
dart pub global run coverage:collect_coverage --wait-paused --uri= -o coverage.json --resume-isolates
dart pub global run coverage:format_coverage --lcov -i coverage.json -o
# Remove extra files from coverage report.
dart pub global run remove_from_coverage -f -r ".pub-cache"