dart-sass/tool/travis/test.sh
Natalie Weizenbaum 04ada09a82
Get rid of the dart2 test tag (#477)
We're only ever running tests under Dart 2 now, so it's irrelevant
whether they're Dart 2-only.
2018-09-19 15:28:47 -04:00

30 lines
988 B
Bash
Executable File

#!/bin/bash -e
# Copyright 2018 Google Inc. Use of this source code is governed by an MIT-style
# license that can be found in the LICENSE file or at
# https://opensource.org/licenses/MIT.
bold=$(tput bold)
none=$(tput sgr0)
if [ "$TASK" = analyze ]; then
echo "${bold}Analzing Dart code.$none"
dartanalyzer --fatal-warnings lib/ test/ tool/
elif [ "$TASK" = format ]; then
echo "${bold}Ensuring Dart code is formatted.$none"
./tool/assert-formatted.sh
elif [ "$TASK" = tests ]; then
if [ -z "$NODE_VERSION" ]; then
echo "${bold}Running Dart tests against $(dart --version &> /dev/stdout).$none"
pub run test -p vm -x node
else
echo "${bold}Running Node tests against Node $(node --version).$none"
pub run test -j 2 -t node
fi;
else
echo "${bold}Running sass-spec against $(dart --version &> /dev/stdout).$none"
if [ "$ASYNC" = true ]; then
extra_args="--dart-args --async"
fi;
(cd sass-spec; bundle exec sass-spec.rb --dart .. $extra_args)
fi