From 99341e30cf17889d3063e76a2eaa05c98021645b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 29 Apr 2016 14:47:39 -0700 Subject: [PATCH 1/5] move helper script for dockerization --- tools/{jenkins => run_tests/dockerize}/build_and_run_docker.sh | 0 .../dockerize}/build_docker_and_run_tests.sh | 0 tools/{jenkins => run_tests/dockerize}/build_interop_image.sh | 0 .../dockerize}/build_interop_stress_image.sh | 0 tools/{jenkins => run_tests/dockerize}/docker_run.sh | 0 tools/{jenkins => run_tests/dockerize}/docker_run_tests.sh | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename tools/{jenkins => run_tests/dockerize}/build_and_run_docker.sh (100%) rename tools/{jenkins => run_tests/dockerize}/build_docker_and_run_tests.sh (100%) rename tools/{jenkins => run_tests/dockerize}/build_interop_image.sh (100%) rename tools/{jenkins => run_tests/dockerize}/build_interop_stress_image.sh (100%) rename tools/{jenkins => run_tests/dockerize}/docker_run.sh (100%) rename tools/{jenkins => run_tests/dockerize}/docker_run_tests.sh (100%) diff --git a/tools/jenkins/build_and_run_docker.sh b/tools/run_tests/dockerize/build_and_run_docker.sh similarity index 100% rename from tools/jenkins/build_and_run_docker.sh rename to tools/run_tests/dockerize/build_and_run_docker.sh diff --git a/tools/jenkins/build_docker_and_run_tests.sh b/tools/run_tests/dockerize/build_docker_and_run_tests.sh similarity index 100% rename from tools/jenkins/build_docker_and_run_tests.sh rename to tools/run_tests/dockerize/build_docker_and_run_tests.sh diff --git a/tools/jenkins/build_interop_image.sh b/tools/run_tests/dockerize/build_interop_image.sh similarity index 100% rename from tools/jenkins/build_interop_image.sh rename to tools/run_tests/dockerize/build_interop_image.sh diff --git a/tools/jenkins/build_interop_stress_image.sh b/tools/run_tests/dockerize/build_interop_stress_image.sh similarity index 100% rename from tools/jenkins/build_interop_stress_image.sh rename to tools/run_tests/dockerize/build_interop_stress_image.sh diff --git a/tools/jenkins/docker_run.sh b/tools/run_tests/dockerize/docker_run.sh similarity index 100% rename from tools/jenkins/docker_run.sh rename to tools/run_tests/dockerize/docker_run.sh diff --git a/tools/jenkins/docker_run_tests.sh b/tools/run_tests/dockerize/docker_run_tests.sh similarity index 100% rename from tools/jenkins/docker_run_tests.sh rename to tools/run_tests/dockerize/docker_run_tests.sh From 26ca776e3ee4b81203cc4b97a956cbe9f6c00268 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 29 Apr 2016 14:51:35 -0700 Subject: [PATCH 2/5] update working directories --- tools/run_tests/dockerize/build_and_run_docker.sh | 2 +- tools/run_tests/dockerize/build_docker_and_run_tests.sh | 2 +- tools/run_tests/dockerize/build_interop_image.sh | 2 +- tools/run_tests/dockerize/build_interop_stress_image.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/dockerize/build_and_run_docker.sh b/tools/run_tests/dockerize/build_and_run_docker.sh index 92dbbc6f380..1ef34b2f960 100755 --- a/tools/run_tests/dockerize/build_and_run_docker.sh +++ b/tools/run_tests/dockerize/build_and_run_docker.sh @@ -33,7 +33,7 @@ set -ex -cd $(dirname $0)/../.. +cd $(dirname $0)/../../.. git_root=$(pwd) cd - diff --git a/tools/run_tests/dockerize/build_docker_and_run_tests.sh b/tools/run_tests/dockerize/build_docker_and_run_tests.sh index 5779e63db97..c2ea6f2c6eb 100755 --- a/tools/run_tests/dockerize/build_docker_and_run_tests.sh +++ b/tools/run_tests/dockerize/build_docker_and_run_tests.sh @@ -33,7 +33,7 @@ set -ex -cd $(dirname $0)/../.. +cd $(dirname $0)/../../.. git_root=$(pwd) cd - diff --git a/tools/run_tests/dockerize/build_interop_image.sh b/tools/run_tests/dockerize/build_interop_image.sh index d2ba97c3de8..48a216a124b 100755 --- a/tools/run_tests/dockerize/build_interop_image.sh +++ b/tools/run_tests/dockerize/build_interop_image.sh @@ -40,7 +40,7 @@ set -x # BUILD_INTEROP_DOCKER_EXTRA_ARGS - optional args to be passed to the # docker run command -cd `dirname $0`/../.. +cd `dirname $0`/../../.. GRPC_ROOT=`pwd` MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" diff --git a/tools/run_tests/dockerize/build_interop_stress_image.sh b/tools/run_tests/dockerize/build_interop_stress_image.sh index 31ffa752ab5..4407c8da90c 100755 --- a/tools/run_tests/dockerize/build_interop_stress_image.sh +++ b/tools/run_tests/dockerize/build_interop_stress_image.sh @@ -44,7 +44,7 @@ set -x # BUILD_INTEROP_DOCKER_EXTRA_ARGS - optional args to be passed to the # docker run command -cd `dirname $0`/../.. +cd `dirname $0`/../../.. GRPC_ROOT=`pwd` MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" From 9835d4b1f7a4a065117e865e98c6f7b01e8eda96 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 29 Apr 2016 15:05:05 -0700 Subject: [PATCH 3/5] update locations of dockerization scripts --- tools/jenkins/run_fuzzer.sh | 4 ++-- tools/run_tests/artifact_targets.py | 4 ++-- tools/run_tests/distribtest_targets.py | 4 ++-- tools/run_tests/package_targets.py | 4 ++-- tools/run_tests/run_interop_tests.py | 2 +- tools/run_tests/run_stress_tests.py | 2 +- tools/run_tests/run_tests.py | 4 ++-- tools/run_tests/stress_test/configs/asan.json | 2 +- tools/run_tests/stress_test/configs/go.json | 2 +- tools/run_tests/stress_test/configs/java.json | 2 +- tools/run_tests/stress_test/configs/node-cxx.json | 4 ++-- tools/run_tests/stress_test/configs/node.json | 2 +- tools/run_tests/stress_test/configs/opt-tsan-asan.json | 6 +++--- tools/run_tests/stress_test/configs/opt.json | 2 +- tools/run_tests/stress_test/configs/tsan.json | 2 +- 15 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tools/jenkins/run_fuzzer.sh b/tools/jenkins/run_fuzzer.sh index 3f25a93319d..cfa7acefab9 100755 --- a/tools/jenkins/run_fuzzer.sh +++ b/tools/jenkins/run_fuzzer.sh @@ -33,14 +33,14 @@ set -ex export RUN_COMMAND="tools/fuzzer/build_and_run_fuzzer.sh $1" -export DOCKER_RUN_SCRIPT=tools/jenkins/docker_run.sh +export DOCKER_RUN_SCRIPT=tools/run_tests/dockerize/docker_run.sh export DOCKERFILE_DIR=tools/dockerfile/test/fuzzer export OUTPUT_DIR=fuzzer_output runtime=${runtime:-3600} jobs=${jobs:-3} -tools/jenkins/build_and_run_docker.sh \ +tools/run_tests/dockerize/build_and_run_docker.sh \ -e RUN_COMMAND="$RUN_COMMAND" \ -e OUTPUT_DIR="$OUTPUT_DIR" \ -e config="$config" \ diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py index e61c46d8b5a..3e08c1d62b3 100644 --- a/tools/run_tests/artifact_targets.py +++ b/tools/run_tests/artifact_targets.py @@ -43,10 +43,10 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh', + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh', 'OUTPUT_DIR': 'artifacts'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='build_artifact.%s' % (name), timeout_seconds=30*60, diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index 34cc1cd7101..ae918be21d2 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -44,9 +44,9 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh'} + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='distribtest.%s' % (name), timeout_seconds=30*60, diff --git a/tools/run_tests/package_targets.py b/tools/run_tests/package_targets.py index 87bc4865ce3..820b539b59f 100644 --- a/tools/run_tests/package_targets.py +++ b/tools/run_tests/package_targets.py @@ -42,10 +42,10 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh', + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh', 'OUTPUT_DIR': 'artifacts'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='build_package.%s' % (name), timeout_seconds=30*60, diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 758be9304d6..e813473421d 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -542,7 +542,7 @@ def build_interop_image_jobspec(language, tag=None): env['BUILD_INTEROP_DOCKER_EXTRA_ARGS'] = \ '-v %s:/root/.composer/auth.json:ro' % host_file build_job = jobset.JobSpec( - cmdline=['tools/jenkins/build_interop_image.sh'], + cmdline=['tools/run_tests/dockerize/build_interop_image.sh'], environ=env, shortname='build_docker_%s' % (language), timeout_seconds=30*60) diff --git a/tools/run_tests/run_stress_tests.py b/tools/run_tests/run_stress_tests.py index 0ba8f51c583..e42ee24ffb0 100755 --- a/tools/run_tests/run_stress_tests.py +++ b/tools/run_tests/run_stress_tests.py @@ -195,7 +195,7 @@ def build_interop_stress_image_jobspec(language, tag=None): tag = 'grpc_interop_stress_%s:%s' % (language.safename, uuid.uuid4()) env = {'INTEROP_IMAGE': tag, 'BASE_NAME': 'grpc_interop_stress_%s' % language.safename} - build_job = jobset.JobSpec(cmdline=['tools/jenkins/build_interop_stress_image.sh'], + build_job = jobset.JobSpec(cmdline=['tools/run_tests/dockerize/build_interop_stress_image.sh'], environ=env, shortname='build_docker_%s' % (language), timeout_seconds=30 * 60) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index d50d5aac95e..37291f4d3fb 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -912,13 +912,13 @@ if args.use_docker: env = os.environ.copy() env['RUN_TESTS_COMMAND'] = run_tests_cmd env['DOCKERFILE_DIR'] = dockerfile_dir - env['DOCKER_RUN_SCRIPT'] = 'tools/jenkins/docker_run_tests.sh' + env['DOCKER_RUN_SCRIPT'] = 'tools/run_tests/dockerize/docker_run_tests.sh' if args.xml_report: env['XML_REPORT'] = args.xml_report if not args.travis: env['TTY_FLAG'] = '-t' # enables Ctrl-C when not on Jenkins. - subprocess.check_call(['tools/jenkins/build_docker_and_run_tests.sh'], + subprocess.check_call(['tools/run_tests/dockerize/build_docker_and_run_tests.sh'], shell=True, env=env) sys.exit(0) diff --git a/tools/run_tests/stress_test/configs/asan.json b/tools/run_tests/stress_test/configs/asan.json index cb9f55763b1..7ae11ccbf1e 100644 --- a/tools/run_tests/stress_test/configs/asan.json +++ b/tools/run_tests/stress_test/configs/asan.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_asan" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "asan" } diff --git a/tools/run_tests/stress_test/configs/go.json b/tools/run_tests/stress_test/configs/go.json index 36b465e763e..f1b2b523d3c 100644 --- a/tools/run_tests/stress_test/configs/go.json +++ b/tools/run_tests/stress_test/configs/go.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_go" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_go" } }, diff --git a/tools/run_tests/stress_test/configs/java.json b/tools/run_tests/stress_test/configs/java.json index 275384c066d..2ce6c007804 100644 --- a/tools/run_tests/stress_test/configs/java.json +++ b/tools/run_tests/stress_test/configs/java.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_java" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_java" } }, diff --git a/tools/run_tests/stress_test/configs/node-cxx.json b/tools/run_tests/stress_test/configs/node-cxx.json index c4245bf9df2..094c1236e71 100644 --- a/tools/run_tests/stress_test/configs/node-cxx.json +++ b/tools/run_tests/stress_test/configs/node-cxx.json @@ -1,12 +1,12 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" }, "grpc_stress_node": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_node" } }, diff --git a/tools/run_tests/stress_test/configs/node.json b/tools/run_tests/stress_test/configs/node.json index 7a48c56a5e2..85eb9e00031 100644 --- a/tools/run_tests/stress_test/configs/node.json +++ b/tools/run_tests/stress_test/configs/node.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_node" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_node" } }, diff --git a/tools/run_tests/stress_test/configs/opt-tsan-asan.json b/tools/run_tests/stress_test/configs/opt-tsan-asan.json index 936d15169e1..fcb3678c02f 100644 --- a/tools/run_tests/stress_test/configs/opt-tsan-asan.json +++ b/tools/run_tests/stress_test/configs/opt-tsan-asan.json @@ -1,17 +1,17 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" }, "grpc_stress_cxx_tsan": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "tsan" }, "grpc_stress_cxx_asan": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "asan" } diff --git a/tools/run_tests/stress_test/configs/opt.json b/tools/run_tests/stress_test/configs/opt.json index f45b8240487..5e0e930d453 100644 --- a/tools/run_tests/stress_test/configs/opt.json +++ b/tools/run_tests/stress_test/configs/opt.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" } diff --git a/tools/run_tests/stress_test/configs/tsan.json b/tools/run_tests/stress_test/configs/tsan.json index 6ef3bdf7ea7..abc759c79da 100644 --- a/tools/run_tests/stress_test/configs/tsan.json +++ b/tools/run_tests/stress_test/configs/tsan.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_tsan" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "tsan" } From 080ddf09ab9c037bea940a32d0075ee1b3d346d4 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 29 Apr 2016 15:07:42 -0700 Subject: [PATCH 4/5] add a readme file --- tools/jenkins/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 tools/jenkins/README.md diff --git a/tools/jenkins/README.md b/tools/jenkins/README.md new file mode 100644 index 00000000000..8e06b68466c --- /dev/null +++ b/tools/jenkins/README.md @@ -0,0 +1 @@ +Scripts invoked by Jenkins (our CI platform) to run gRPC test suites. From 9c8351257569e3c79d1d900c16cf942a8183fe95 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 15:58:06 -0700 Subject: [PATCH 5/5] update remaining stresstest configs --- tools/run_tests/stress_test/configs/csharp.json | 2 +- tools/run_tests/stress_test/configs/ruby.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/stress_test/configs/csharp.json b/tools/run_tests/stress_test/configs/csharp.json index b7090696b4f..406949557dc 100644 --- a/tools/run_tests/stress_test/configs/csharp.json +++ b/tools/run_tests/stress_test/configs/csharp.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_csharp" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_csharp" } }, diff --git a/tools/run_tests/stress_test/configs/ruby.json b/tools/run_tests/stress_test/configs/ruby.json index a323fa72b6b..7e2afcbb69e 100644 --- a/tools/run_tests/stress_test/configs/ruby.json +++ b/tools/run_tests/stress_test/configs/ruby.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_ruby" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_ruby" } },