aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/distrib
diff options
context:
space:
mode:
Diffstat (limited to 'test/distrib')
-rw-r--r--test/distrib/csharp/DistribTest/Program.cs2
-rwxr-xr-xtest/distrib/csharp/run_distrib_test.sh2
-rwxr-xr-xtest/distrib/csharp/update_version.sh2
-rwxr-xr-xtest/distrib/node/distrib_test.js2
-rwxr-xr-xtest/distrib/node/run_distrib_test.sh24
-rwxr-xr-xtest/distrib/php/run_distrib_test.sh2
-rwxr-xr-xtest/distrib/python/run_distrib_test.sh2
-rwxr-xr-xtest/distrib/ruby/run_distrib_test.sh2
8 files changed, 22 insertions, 16 deletions
diff --git a/test/distrib/csharp/DistribTest/Program.cs b/test/distrib/csharp/DistribTest/Program.cs
index e944648f17..c68b380547 100644
--- a/test/distrib/csharp/DistribTest/Program.cs
+++ b/test/distrib/csharp/DistribTest/Program.cs
@@ -1,6 +1,6 @@
#region Copyright notice and license
-// Copyright 2015-2016, Google Inc.
+// Copyright 2015, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
diff --git a/test/distrib/csharp/run_distrib_test.sh b/test/distrib/csharp/run_distrib_test.sh
index 934174a9a4..64e98d8009 100755
--- a/test/distrib/csharp/run_distrib_test.sh
+++ b/test/distrib/csharp/run_distrib_test.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2015-2016, Google Inc.
+# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/test/distrib/csharp/update_version.sh b/test/distrib/csharp/update_version.sh
index b0d07721f6..189d0ad357 100755
--- a/test/distrib/csharp/update_version.sh
+++ b/test/distrib/csharp/update_version.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2015-2016, Google Inc.
+# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/test/distrib/node/distrib_test.js b/test/distrib/node/distrib_test.js
index cdd8eba8b8..8efd33ad8d 100755
--- a/test/distrib/node/distrib_test.js
+++ b/test/distrib/node/distrib_test.js
@@ -1,7 +1,7 @@
#!/usr/bin/env node
/*
*
- * Copyright 2015-2016, Google Inc.
+ * Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
diff --git a/test/distrib/node/run_distrib_test.sh b/test/distrib/node/run_distrib_test.sh
index 9b8f15771b..d429eb27e1 100755
--- a/test/distrib/node/run_distrib_test.sh
+++ b/test/distrib/node/run_distrib_test.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2015-2016, Google Inc.
+# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -28,23 +28,31 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+function finish() {
+ rv=$?
+ kill $STATIC_PID || true
+ curl "localhost:32767/drop/$STATIC_PORT" || true
+ exit $rv
+}
+
+trap finish EXIT
+
NODE_VERSION=$1
source ~/.nvm/nvm.sh
-set -ex
cd $(dirname $0)
nvm install $NODE_VERSION
+set -ex
npm install -g node-static
-# Kill off existing static servers
-kill -9 $(ps aux | grep '[n]ode .*static' | awk '{print $2}') || true
-
STATIC_SERVER=127.0.0.1
-STATIC_PORT=8080
+# If port_server is running, get port from that. Otherwise, assume we're in
+# docker and use 8080
+STATIC_PORT=$(curl 'localhost:32767/get' || echo '8080')
-# Serves the input_artifacts directory statically at localhost:8080
+# Serves the input_artifacts directory statically at localhost:
static "$EXTERNAL_GIT_ROOT/input_artifacts" -a $STATIC_SERVER -p $STATIC_PORT &
STATIC_PID=$!
@@ -52,6 +60,4 @@ STATIC_URL="http://$STATIC_SERVER:$STATIC_PORT/"
npm install --unsafe-perm $STATIC_URL/grpc.tgz --grpc_node_binary_host_mirror=$STATIC_URL
-kill -9 $STATIC_PID
-
./distrib_test.js
diff --git a/test/distrib/php/run_distrib_test.sh b/test/distrib/php/run_distrib_test.sh
index 43b28d8429..5c86283282 100755
--- a/test/distrib/php/run_distrib_test.sh
+++ b/test/distrib/php/run_distrib_test.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2015-2016, Google Inc.
+# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/test/distrib/python/run_distrib_test.sh b/test/distrib/python/run_distrib_test.sh
index 8fd7ffb54c..79893af8e5 100755
--- a/test/distrib/python/run_distrib_test.sh
+++ b/test/distrib/python/run_distrib_test.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2015-2016, Google Inc.
+# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
diff --git a/test/distrib/ruby/run_distrib_test.sh b/test/distrib/ruby/run_distrib_test.sh
index be60e44b63..b0954b0499 100755
--- a/test/distrib/ruby/run_distrib_test.sh
+++ b/test/distrib/ruby/run_distrib_test.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright 2015-2016, Google Inc.
+# Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without