aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2015-02-05 11:42:58 -0800
committerGravatar Craig Tiller <ctiller@google.com>2015-02-05 11:42:58 -0800
commit86d9159356d5d23981f122c3bd4ad912203666ca (patch)
tree1cf0b4622ada6275370277a748438102e44188f4 /tools
parent24fc2c4c5ddc56a678f17170ac4eec4ec570c780 (diff)
parent6b9afb153a82c921c7e80365a4e129c462c0ebad (diff)
Merge github.com:google/grpc into async-api-new
Diffstat (limited to 'tools')
-rwxr-xr-xtools/gce_setup/builder.sh29
-rwxr-xr-xtools/gce_setup/cloud_prod_runner.sh4
-rwxr-xr-xtools/gce_setup/grpc_docker.sh22
-rwxr-xr-xtools/gce_setup/interop_test_runner.sh42
-rw-r--r--tools/gce_setup/post.html12
-rw-r--r--tools/gce_setup/pre.html14
-rwxr-xr-xtools/run_tests/run_tests.py5
-rw-r--r--tools/tsan_suppressions.txt2
8 files changed, 95 insertions, 35 deletions
diff --git a/tools/gce_setup/builder.sh b/tools/gce_setup/builder.sh
new file mode 100755
index 0000000000..49b3c436fe
--- /dev/null
+++ b/tools/gce_setup/builder.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+main() {
+ # restart builder vm and wait for images to sync to it
+ source grpc_docker.sh
+ ./new_grpc_docker_builder.sh -igrpc-docker-builder-alt-2 -anone
+ cd ../../
+ sleep 3600
+
+ # build images for all languages
+ languages=(cxx java go ruby node)
+ for lan in "${languages[@]}"
+ do
+ grpc_update_image $lan
+ done
+
+ # restart client and server vm and wait for images to sync to them
+ cd tools/gce_setup
+ ./new_grpc_docker_builder.sh -igrpc-docker-testclients -anone
+ ./new_grpc_docker_builder.sh -igrpc-docker-server -anone
+ sleep 3600
+
+ # launch images for all languages on server
+ grpc_launch_servers grpc-docker-server
+
+}
+
+set -x
+main "$@"
diff --git a/tools/gce_setup/cloud_prod_runner.sh b/tools/gce_setup/cloud_prod_runner.sh
index 0c1163ad7d..200f859ede 100755
--- a/tools/gce_setup/cloud_prod_runner.sh
+++ b/tools/gce_setup/cloud_prod_runner.sh
@@ -2,8 +2,8 @@
main() {
source grpc_docker.sh
- test_cases=(large_unary empty_unary client_streaming server_streaming)
- clients=(cxx java go ruby)
+ test_cases=(large_unary empty_unary ping_pong client_streaming server_streaming)
+ clients=(cxx java go ruby node)
for test_case in "${test_cases[@]}"
do
for client in "${clients[@]}"
diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh
index 2ac75f3cc5..2e02653864 100755
--- a/tools/gce_setup/grpc_docker.sh
+++ b/tools/gce_setup/grpc_docker.sh
@@ -762,7 +762,16 @@ grpc_interop_test() {
echo " $ssh_cmd"
echo "on $host"
[[ $dry_run == 1 ]] && return 0 # don't run the command on a dry run
- gcloud compute $project_opt ssh $zone_opt $host --command "$cmd"
+ gcloud compute $project_opt ssh $zone_opt $host --command "$cmd" &
+ PID=$!
+ sleep 10
+ echo "pid is $PID"
+ if ps -p $PID
+ then
+ kill $PID
+ return 1
+ fi
+
}
# Runs a test command on a docker instance.
@@ -808,7 +817,16 @@ grpc_cloud_prod_test() {
echo " $ssh_cmd"
echo "on $host"
[[ $dry_run == 1 ]] && return 0 # don't run the command on a dry run
- gcloud compute $project_opt ssh $zone_opt $host --command "$cmd"
+ gcloud compute $project_opt ssh $zone_opt $host --command "$cmd" &
+ PID=$!
+ sleep 10
+ echo "pid is $PID"
+ if ps -p $PID
+ then
+ kill $PID
+ return 1
+ fi
+
}
# Runs a test command on a docker instance.
diff --git a/tools/gce_setup/interop_test_runner.sh b/tools/gce_setup/interop_test_runner.sh
index 1244307912..456ad4b472 100755
--- a/tools/gce_setup/interop_test_runner.sh
+++ b/tools/gce_setup/interop_test_runner.sh
@@ -1,33 +1,8 @@
#!/bin/bash
thisfile=$(readlink -ne "${BASH_SOURCE[0]}")
-
-run_test() {
- local test_case=$1
- shift
- local client=$1
- shift
- local server=$1
- if grpc_interop_test $test_case grpc-docker-testclients $client grpc-docker-server $server
- then
- echo "$test_case $client $server passed" >> /tmp/interop_result.txt
- else
- echo "$test_case $client $server failed" >> /tmp/interop_result.txt
- fi
-}
-
-time_out() {
- local test_case=$1
- shift
- local client=$1
- shift
- local server=$1
- if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
- if ! timeout 20s bash -l -c "source $thisfile && run_test $test_case $client $server"
- then
- echo "$test_case $client $server timed out" >> /tmp/interop_result.txt
- fi
- fi
-}
+current_time=$(date "+%Y-%m-%d-%H-%M-%S")
+result_file_name=interop_result.$current_time.html
+echo $result_file_name
main() {
source grpc_docker.sh
@@ -40,13 +15,22 @@ main() {
do
for server in "${servers[@]}"
do
- time_out $test_case $client $server
+ if grpc_interop_test $test_case grpc-docker-testclients $client grpc-docker-server $server
+ then
+ echo " ['$test_case', '$client', '$server', true]," >> /tmp/interop_result.txt
+ else
+ echo " ['$test_case', '$client', '$server', false]," >> /tmp/interop_result.txt
+ fi
done
done
done
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
+ cat pre.html /tmp/interop_result.txt post.html > /tmp/interop_result.html
gsutil cp /tmp/interop_result.txt gs://stoked-keyword-656-output/interop_result.txt
+ gsutil cp /tmp/interop_result.html gs://stoked-keyword-656-output/interop_result.html
+ gsutil cp /tmp/interop_result.html gs://stoked-keyword-656-output/result_history/$result_file_name
rm /tmp/interop_result.txt
+ rm /tmp/interop_result.html
fi
}
diff --git a/tools/gce_setup/post.html b/tools/gce_setup/post.html
new file mode 100644
index 0000000000..57cbc8c369
--- /dev/null
+++ b/tools/gce_setup/post.html
@@ -0,0 +1,12 @@
+ ]);
+
+ var table = new google.visualization.Table(document.getElementById('table_div'));
+
+ table.draw(data, {showRowNumber: true});
+ }
+ </script>
+ </head>
+ <body>
+ <div id="table_div"></div>
+ </body>
+</html>
diff --git a/tools/gce_setup/pre.html b/tools/gce_setup/pre.html
new file mode 100644
index 0000000000..74ce5ce202
--- /dev/null
+++ b/tools/gce_setup/pre.html
@@ -0,0 +1,14 @@
+<html>
+ <head>
+ <script type="text/javascript" src="https://www.google.com/jsapi"></script>
+ <script type="text/javascript">
+ google.load("visualization", "1", {packages:["table"]});
+ google.setOnLoadCallback(drawTable);
+
+ function drawTable() {
+ var data = new google.visualization.DataTable();
+ data.addColumn('string', 'TestCase');
+ data.addColumn('string', 'Client');
+ data.addColumn('string', 'Server');
+ data.addColumn('boolean', 'Pass');
+ data.addRows([
diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py
index 280c3f05cb..cb54c0db82 100755
--- a/tools/run_tests/run_tests.py
+++ b/tools/run_tests/run_tests.py
@@ -108,10 +108,11 @@ class PythonLanguage(object):
_CONFIGS = {
'dbg': SimpleConfig('dbg'),
'opt': SimpleConfig('opt'),
- 'tsan': SimpleConfig('tsan'),
+ 'tsan': SimpleConfig('tsan', environ={
+ 'TSAN_OPTIONS': 'suppressions=tools/tsan_suppressions.txt'}),
'msan': SimpleConfig('msan'),
'asan': SimpleConfig('asan', environ={
- 'ASAN_OPTIONS': 'detect_leaks=1:color=always'}),
+ 'ASAN_OPTIONS': 'detect_leaks=1:color=always:suppressions=tools/tsan_suppressions.txt'}),
'gcov': SimpleConfig('gcov'),
'memcheck': ValgrindConfig('valgrind', 'memcheck'),
'helgrind': ValgrindConfig('dbg', 'helgrind')
diff --git a/tools/tsan_suppressions.txt b/tools/tsan_suppressions.txt
new file mode 100644
index 0000000000..23d57f9fd1
--- /dev/null
+++ b/tools/tsan_suppressions.txt
@@ -0,0 +1,2 @@
+# OPENSSL_cleanse does racy access to a global
+race:OPENSSL_cleanse