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

Unified Diff: pkg/appengine/test/dart-python--datastore-compatibility/tools/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
Index: pkg/appengine/test/dart-python--datastore-compatibility/tools/run_tests.sh
diff --git a/pkg/appengine/test/dart-python--datastore-compatibility/tools/run_tests.sh b/pkg/appengine/test/dart-python--datastore-compatibility/tools/run_tests.sh
new file mode 100755
index 0000000000000000000000000000000000000000..c9a10777ad66df0dad446b7214f35d15a32389d2
--- /dev/null
+++ b/pkg/appengine/test/dart-python--datastore-compatibility/tools/run_tests.sh
@@ -0,0 +1,142 @@
+#!/bin/bash
+
+REPO_ROOT=$( cd $(dirname $(dirname "${BASH_SOURCE[0]}" )) && pwd )
+
+# Source utility functions
+source "$REPO_ROOT/tools/utils.sh"
+
+# Check that the necessary environment variables are set.
+check_env_variable "DART_SDK"
+check_env_variable "APPENGINE_DEVAPPSERVER"
+check_env_variable "APPENGINE_API_SERVER"
+
+export PY_BOOTSTRAP_APP="$REPO_ROOT/python/bootstrap.py"
+export PATH="$PATH:$DART_SDK/bin"
+export RETURN_VALUE=0
+
+
+start_phase "Analyzing"
+analyze_file "$REPO_ROOT/dart/bin/main.dart"
+RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+
+
+##############################################################
+# Phase 1: Python => Dart
+##############################################################
+
+start_phase "Testing Python => Dart"
+
+"$APPENGINE_API_SERVER" -A 'dev~test-application' \
+ --api_port 4444 --high_replication &
+API_SERVER_PID=$!
+sleep 3
+
+
+
+"$PY_BOOTSTRAP_APP" "write"
+RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+
+
+test_file "$REPO_ROOT/dart/bin/main.dart" "read"
+RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+
+
+kill $API_SERVER_PID &> /dev/null
+
+
+# Wait until background jobs are done.
+wait
+echo
+echo
+echo
+
+
+##############################################################
+# Phase 2: Python => Python
+##############################################################
+
+start_phase "Testing Python => Python"
+
+"$APPENGINE_API_SERVER" -A 'dev~test-application' \
+ --api_port 4444 --high_replication &
+API_SERVER_PID=$!
+sleep 3
+
+
+"$PY_BOOTSTRAP_APP" "write"
+RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+
+
+"$PY_BOOTSTRAP_APP" "read"
+RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+
+
+kill $API_SERVER_PID &> /dev/null
+
+
+# Wait until background jobs are done.
+wait
+echo
+echo
+echo
+
+##############################################################
+# Phase 3: Dart => Python
+##############################################################
+
+start_phase "Testing Dart => Python"
+
+"$APPENGINE_API_SERVER" -A 'dev~test-application' \
+ --api_port 4444 --high_replication &
+API_SERVER_PID=$!
+sleep 3
+
+
+test_file "$REPO_ROOT/dart/bin/main.dart" "write"
+RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+
+
+"$PY_BOOTSTRAP_APP" "read"
+RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+
+
+kill $API_SERVER_PID &> /dev/null
+
+
+# Wait until background jobs are done.
+wait
+echo
+echo
+echo
+
+
+##############################################################
+# Phase 4: Dart => Dart
+##############################################################
+
+start_phase "Testing Dart => Dart"
+
+"$APPENGINE_API_SERVER" -A 'dev~test-application' \
+ --api_port 4444 --high_replication &
+API_SERVER_PID=$!
+sleep 3
+
+
+test_file "$REPO_ROOT/dart/bin/main.dart" "write"
+RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+
+
+test_file "$REPO_ROOT/dart/bin/main.dart" "read"
+RETURN_VALUE=$(expr $RETURN_VALUE + $?)
+
+
+kill $API_SERVER_PID &> /dev/null
+
+
+# Wait until background jobs are done.
+wait
+echo
+echo
+echo
+
+exit $RETURN_VALUE

Powered by Google App Engine
This is Rietveld 408576698