Switch Node interop tests to use grpc-node repo

pull/13043/head
murgatroid99 7 years ago
parent d6b7a28e36
commit fbc182e125
  1. 13
      tools/dockerfile/interoptest/grpc_interop_node/build_interop.sh
  2. 1
      tools/internal_ci/helper_scripts/prepare_build_interop_rc
  3. 1
      tools/internal_ci/helper_scripts/prepare_build_macos_interop_rc
  4. 2
      tools/interop_matrix/create_matrix_images.py
  5. 8
      tools/run_tests/dockerize/build_interop_image.sh
  6. 12
      tools/run_tests/run_interop_tests.py

@ -17,17 +17,18 @@
set -e
mkdir -p /var/local/git
git clone /var/local/jenkins/grpc /var/local/git/grpc
git clone /var/local/jenkins/grpc-node /var/local/git/grpc-node
# clone gRPC submodules, use data from locally cloned submodules where possible
(cd /var/local/jenkins/grpc/ && git submodule foreach 'cd /var/local/git/grpc \
&& git submodule update --init --reference /var/local/jenkins/grpc/${name} \
(cd /var/local/jenkins/grpc-node/ && git submodule foreach 'cd /var/local/git/grpc-node \
&& git submodule update --init --recursive --reference /var/local/jenkins/grpc-node/${name} \
${name}')
# copy service account keys if available
cp -r /var/local/jenkins/service_account $HOME || true
cd /var/local/git/grpc
cd /var/local/git/grpc-node
# build Node interop client & server
npm install -g node-gyp
npm install --unsafe-perm --build-from-source
npm install -g node-gyp gulp
npm install
gulp setup

@ -26,6 +26,7 @@ git submodule update --init
# Set up gRPC-Go and gRPC-Java to test
git clone --recursive https://github.com/grpc/grpc-go ./../grpc-go
git clone --recursive https://github.com/grpc/grpc-java ./../grpc-java
git clone --recursive https://github.com/grpc/grpc-node ./../grpc-node
# Download json file.
mkdir ~/service_account

@ -30,6 +30,7 @@ brew install md5sha1sum
# Set up gRPC-Go and gRPC-Java to test
git clone --recursive https://github.com/grpc/grpc-go ./../grpc-go
git clone --recursive https://github.com/grpc/grpc-java ./../grpc-java
git clone --recursive https://github.com/grpc/grpc-node ./../grpc-node
# Set up Docker for Mac
docker-machine create -d virtualbox --virtualbox-share-folder "/Users/kbuilder/workspace:" default

@ -174,7 +174,7 @@ def build_all_images_for_release(lang, release):
# If we not using current tree or the sibling for grpc stack, do checkout.
if args.git_checkout:
stack_base = checkout_grpc_stack(lang, release)
var ={'go': 'GRPC_GO_ROOT', 'java': 'GRPC_JAVA_ROOT'}.get(lang, 'GRPC_ROOT')
var ={'go': 'GRPC_GO_ROOT', 'java': 'GRPC_JAVA_ROOT', 'node': 'GRPC_NODE_ROOT'}.get(lang, 'GRPC_ROOT')
env[var] = stack_base
for runtime in client_matrix.LANG_RUNTIME_MATRIX[lang]:

@ -48,6 +48,14 @@ else
echo "WARNING: grpc-go not found, it won't be mounted to the docker container."
fi
echo "GRPC_NODE_ROOT: ${GRPC_NODE_ROOT:=$(cd ../grpc-node && pwd)}"
if [ -n "$GRPC_NODE_ROOT" ]
then
MOUNT_ARGS+=" -v $GRPC_NODE_ROOT:/var/local/jenkins/grpc-node:ro"
else
echo "WARNING: grpc-node not found, it won't be mounted to the docker container."
fi
mkdir -p /tmp/ccache
# Mount service account dir if available.

@ -308,20 +308,20 @@ class Http2Client:
class NodeLanguage:
def __init__(self):
self.client_cwd = None
self.server_cwd = None
self.client_cwd = '../grpc-node'
self.server_cwd = '../grpc-node'
self.safename = str(self)
def client_cmd(self, args):
return ['tools/run_tests/interop/with_nvm.sh',
'node', 'src/node/interop/interop_client.js'] + args
return ['packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh',
'node', 'test/interop/interop_client.js'] + args
def cloud_to_prod_env(self):
return {}
def server_cmd(self, args):
return ['tools/run_tests/interop/with_nvm.sh',
'node', 'src/node/interop/interop_server.js'] + args
return ['packages/grpc-native-core/deps/grpc/tools/run_tests/interop/with_nvm.sh',
'node', 'test/interop/interop_server.js'] + args
def global_env(self):
return {}

Loading…
Cancel
Save