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

Unified Diff: pkg/appengine/tool/run_tests.sh

Issue 804973002: Add appengine/gcloud/mustache dependencies. (Closed) Base URL: git@github.com:dart-lang/pub-dartlang-dart.git@master
Patch Set: Added AUTHORS/LICENSE/PATENTS files Created 6 years 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/appengine/test/utils/raw_datastore_test_utils.dart ('k') | pkg/appengine/tool/utils.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/appengine/tool/run_tests.sh
diff --git a/pkg/appengine/tool/run_tests.sh b/pkg/appengine/tool/run_tests.sh
new file mode 100755
index 0000000000000000000000000000000000000000..613fc2e67da798f47cce65dfabdcf3f8b62df3a1
--- /dev/null
+++ b/pkg/appengine/tool/run_tests.sh
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+REPO_ROOT=$( cd $(dirname $(dirname "${BASH_SOURCE[0]}" )) && pwd )
+
+# Source utility functions
+source "$REPO_ROOT/tool/utils.sh"
+
+# Check that the necessary environment variables are set.
+check_env_variable "DART_SDK"
+check_env_variable "APPENGINE_API_SERVER"
+
+export PATH="$PATH:$DART_SDK/bin"
+export RETURN_VALUE=0
+
+start_phase "Analyzing"
+analyze_files $(find $REPO_ROOT/lib -name "*.dart")
+RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+
+analyze_files $(find $REPO_ROOT/test -name '*.dart')
+RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+
+start_phase "Starting API server"
+"$APPENGINE_API_SERVER" -A 'dev~test-application' \
+ --api_port 4444 --high_replication &
+API_SERVER_PID=$!
+sleep 3
+
+
+start_phase "Testing"
+for testfile in $(find $REPO_ROOT/test -name "*test.dart"); do
+ pushd "$REPO_ROOT/test"
+ test_file "$testfile"
+ RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+ popd
+done
+
+
+start_phase "Killing API server"
+kill $API_SERVER_PID &> /dev/null
+
+
+# Wait until background jobs are done.
+wait
+echo
+echo
+
+test $RETURN_VALUE -ne 0 && exit 1
+exit 0
« no previous file with comments | « pkg/appengine/test/utils/raw_datastore_test_utils.dart ('k') | pkg/appengine/tool/utils.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698