Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(49)

Unified Diff: pkg/csslib/test/run.sh

Issue 23168002: move csslib into dart svn (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/csslib/test/nested_test.dart ('k') | pkg/csslib/test/run_all.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/csslib/test/run.sh
diff --git a/pkg/csslib/test/run.sh b/pkg/csslib/test/run.sh
new file mode 100755
index 0000000000000000000000000000000000000000..7d26209040eb23752927fa818b32f34502b7bfba
--- /dev/null
+++ b/pkg/csslib/test/run.sh
@@ -0,0 +1,39 @@
+#!/bin/bash
+# Copyright (c) 2012, 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.
+
+# Usage: call directly in the commandline as test/run.sh ensuring that you have
+# 'dart' in your path. Filter tests by passing a pattern as an argument to this
+# script.
+
+# TODO(sigmund): replace with a real test runner
+
+# bail on error
+set -e
+
+# print commands executed by this script
+# set -x
+
+DIR=$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd )
+DART_FLAGS="--checked"
+TEST_PATTERN=$1
+
+if [[ ($TEST_PATTERN == "") ]]; then
+ # Note: dart_analyzer needs to be run from the root directory for proper path
+ # canonicalization.
+ pushd $DIR/.. &>/dev/null
+ echo Analyzing compiler for warnings or type errors
+ dartanalyzer --fatal-warnings --fatal-type-errors bin/css.dart
+ popd &>/dev/null
+fi
+
+pushd $DIR &>/dev/null
+if [[ ($TEST_PATTERN == "canary") || ($TEST_PATTERN = "") ]]; then
+ dart $DART_FLAGS run_all.dart
+else
+ dart $DART_FLAGS run_all.dart $TEST_PATTERN
+fi
+popd &>/dev/null
+
+echo All tests completed.
« no previous file with comments | « pkg/csslib/test/nested_test.dart ('k') | pkg/csslib/test/run_all.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698