diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/distrib/python/submit.py | 28 | ||||
-rwxr-xr-x | tools/dockerfile/grpc_cxx/build.sh | 28 | ||||
-rwxr-xr-x | tools/dockerfile/grpc_java/build.sh | 28 | ||||
-rw-r--r-- | tools/dockerfile/grpc_java_android/Dockerfile | 7 | ||||
-rwxr-xr-x | tools/dockerfile/grpc_node/build.sh | 28 | ||||
-rwxr-xr-x | tools/dockerfile/grpc_ruby/build.sh | 28 | ||||
-rwxr-xr-x | tools/gce_setup/private_build_and_test.sh | 28 | ||||
-rwxr-xr-x | tools/run_tests/antagonist.py | 34 | ||||
-rwxr-xr-x | tools/run_tests/prepare_travis.sh | 28 | ||||
-rwxr-xr-x | tools/run_tests/run_python.sh | 1 | ||||
-rwxr-xr-x | tools/run_tests/run_tests.py | 56 | ||||
-rw-r--r-- | tools/run_tests/tests.json | 18 |
12 files changed, 291 insertions, 21 deletions
diff --git a/tools/distrib/python/submit.py b/tools/distrib/python/submit.py index 79ebb93e57..dd48f440ba 100755 --- a/tools/distrib/python/submit.py +++ b/tools/distrib/python/submit.py @@ -1,4 +1,32 @@ #!/usr/bin/env python +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import argparse import os diff --git a/tools/dockerfile/grpc_cxx/build.sh b/tools/dockerfile/grpc_cxx/build.sh index 8a9e95ccb8..8df3f15412 100755 --- a/tools/dockerfile/grpc_cxx/build.sh +++ b/tools/dockerfile/grpc_cxx/build.sh @@ -1,4 +1,32 @@ #!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. rm -rf /var/local/git cp -R /var/local/git-clone /var/local/git diff --git a/tools/dockerfile/grpc_java/build.sh b/tools/dockerfile/grpc_java/build.sh index ce35018533..e55f2e0f47 100755 --- a/tools/dockerfile/grpc_java/build.sh +++ b/tools/dockerfile/grpc_java/build.sh @@ -1,4 +1,32 @@ #!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. rm -rf /var/local/git cp -R /var/local/git-clone /var/local/git cd /var/local/git/grpc-java/lib/netty && \ diff --git a/tools/dockerfile/grpc_java_android/Dockerfile b/tools/dockerfile/grpc_java_android/Dockerfile index d11e88943c..2dc2202e9d 100644 --- a/tools/dockerfile/grpc_java_android/Dockerfile +++ b/tools/dockerfile/grpc_java_android/Dockerfile @@ -44,10 +44,13 @@ ENV PATH $PATH:$ANDROID_HOME/platform-tools ENV HOME /root # Update sdk for android 5.1 (API level 22) -RUN echo y | android update sdk --all --filter platform-tools,build-tools-22.0.1,sys-img-armeabi-v7a-android-22,android-22,extra-android-m2repository,extra-google-m2repository --no-ui --force +RUN echo y | android update sdk --all --filter platform-tools,build-tools-22.0.1,sys-img-armeabi-v7a-addon-google_apis-google-22,sys-img-armeabi-v7a-addon-google_apis-google-21,sys-img-armeabi-v7a-android-19,addon-google_apis-google-22,addon-google_apis-google-21,addon-google_apis-google-19,extra-android-m2repository,extra-google-m2repository --no-ui --force + # Create an AVD with API level 22 -RUN echo no | android create avd --force -n avd-api-22 -t android-22 +RUN echo no | android create avd --force -n avd-google-api-22 -t "Google Inc.:Google APIs:22" --abi google_apis/armeabi-v7a +RUN echo no | android create avd --force -n avd-google-api-21 -t "Google Inc.:Google APIs:21" --abi google_apis/armeabi-v7a +RUN echo no | android create avd --force -n avd-google-api-19 -t "Google Inc.:Google APIs:19" --abi default/armeabi-v7a # Pull gRPC Java and trigger download of needed Maven and Gradle artifacts. RUN git clone --depth 1 https://github.com/grpc/grpc-java.git /var/local/git/grpc-java && \ diff --git a/tools/dockerfile/grpc_node/build.sh b/tools/dockerfile/grpc_node/build.sh index 86a681d453..be89cc1fcf 100755 --- a/tools/dockerfile/grpc_node/build.sh +++ b/tools/dockerfile/grpc_node/build.sh @@ -1,4 +1,32 @@ #!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cp -R /var/local/git-clone/grpc /var/local/git make clean -C /var/local/git/grpc diff --git a/tools/dockerfile/grpc_ruby/build.sh b/tools/dockerfile/grpc_ruby/build.sh index ab0267d9a6..1165561894 100755 --- a/tools/dockerfile/grpc_ruby/build.sh +++ b/tools/dockerfile/grpc_ruby/build.sh @@ -1,4 +1,32 @@ #!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cp -R /var/local/git-clone/grpc /var/local/git make clean -C /var/local/git/grpc diff --git a/tools/gce_setup/private_build_and_test.sh b/tools/gce_setup/private_build_and_test.sh index 9c5c347a30..7d5d25eb01 100755 --- a/tools/gce_setup/private_build_and_test.sh +++ b/tools/gce_setup/private_build_and_test.sh @@ -1,4 +1,32 @@ #!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # This script has to be run from the same directory as grpc_docker.sh and after grpc_docker.sh is sourced # diff --git a/tools/run_tests/antagonist.py b/tools/run_tests/antagonist.py new file mode 100755 index 0000000000..111839ccf9 --- /dev/null +++ b/tools/run_tests/antagonist.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""This is used by run_tests.py to create cpu load on a machine""" + +while True: + pass diff --git a/tools/run_tests/prepare_travis.sh b/tools/run_tests/prepare_travis.sh index a8ddc578d5..34a058f2a8 100755 --- a/tools/run_tests/prepare_travis.sh +++ b/tools/run_tests/prepare_travis.sh @@ -1,4 +1,32 @@ #!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. cd `dirname $0`/../.. grpc_dir=`pwd` diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index f0e091f47a..cab08f9358 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -35,5 +35,6 @@ cd $(dirname $0)/../.. root=`pwd` export LD_LIBRARY_PATH=$root/libs/$CONFIG +export DYLD_LIBRARY_PATH=$root/libs/$CONFIG source python2.7_virtual_environment/bin/activate python2.7 -B $* diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 41f53a434a..3a344693c1 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -40,6 +40,7 @@ import re import sys import time import platform +import subprocess import jobset import watch_dirs @@ -61,7 +62,7 @@ class SimpleConfig(object): self.environ = environ self.environ['CONFIG'] = config - def job_spec(self, cmdline, hash_targets, shortname=None): + def job_spec(self, cmdline, hash_targets, shortname=None, environ={}): """Construct a jobset.JobSpec for a test under this config Args: @@ -73,9 +74,12 @@ class SimpleConfig(object): -- if used, all artifacts needed to run the test must be listed """ + actual_environ = self.environ.copy() + for k, v in environ.iteritems(): + actual_environ[k] = v return jobset.JobSpec(cmdline=cmdline, shortname=shortname, - environ=self.environ, + environ=actual_environ, hash_targets=hash_targets if self.allow_hashing else None) @@ -143,7 +147,8 @@ class CLanguage(object): class NodeLanguage(object): def test_specs(self, config, travis): - return [config.job_spec(['tools/run_tests/run_node.sh'], None)] + return [config.job_spec(['tools/run_tests/run_node.sh'], None, + environ={'GRPC_TRACE': 'surface,batch'})] def make_targets(self): return ['static_c'] @@ -161,7 +166,8 @@ class NodeLanguage(object): class PhpLanguage(object): def test_specs(self, config, travis): - return [config.job_spec(['src/php/bin/run_tests.sh'], None)] + return [config.job_spec(['src/php/bin/run_tests.sh'], None, + environ={'GRPC_TRACE': 'surface,batch'})] def make_targets(self): return ['static_c'] @@ -184,15 +190,17 @@ class PythonLanguage(object): def test_specs(self, config, travis): modules = [config.job_spec(['tools/run_tests/run_python.sh', '-m', - test['module']], - None, + test['module']], + None, + environ={'GRPC_TRACE': 'surface,batch'}, shortname=test['module']) for test in self._tests if 'module' in test] files = [config.job_spec(['tools/run_tests/run_python.sh', - test['file']], - None, + test['file']], + None, + environ={'GRPC_TRACE': 'surface,batch'}, shortname=test['file']) - for test in self._tests if 'file' in test] + for test in self._tests if 'file' in test] return files + modules def make_targets(self): @@ -211,7 +219,8 @@ class PythonLanguage(object): class RubyLanguage(object): def test_specs(self, config, travis): - return [config.job_spec(['tools/run_tests/run_ruby.sh'], None)] + return [config.job_spec(['tools/run_tests/run_ruby.sh'], None, + environ={'GRPC_TRACE': 'surface,batch'})] def make_targets(self): return ['run_dep_checks'] @@ -232,7 +241,8 @@ class CSharpLanguage(object): 'Grpc.Examples.Tests', 'Grpc.IntegrationTesting'] return [config.job_spec(['tools/run_tests/run_csharp.sh', assembly], - None, shortname=assembly) + None, shortname=assembly, + environ={'GRPC_TRACE': 'surface,batch'}) for assembly in assemblies ] def make_targets(self): @@ -341,6 +351,7 @@ argp.add_argument('-l', '--language', choices=sorted(_LANGUAGES.keys()), nargs='+', default=sorted(_LANGUAGES.keys())) +argp.add_argument('-a', '--antagonists', default=0, type=int) args = argp.parse_args() # grab config @@ -435,14 +446,21 @@ def _build_and_run(check_cancelled, newline_on_success, travis, cache): newline_on_success=newline_on_success, travis=travis): return 1 - # run all the tests - all_runs = itertools.chain.from_iterable( - itertools.repeat(one_run, runs_per_test)) - if not jobset.run(all_runs, check_cancelled, - newline_on_success=newline_on_success, travis=travis, - maxjobs=min(args.jobs, min(c.maxjobs for c in run_configs)), - cache=cache): - return 2 + # start antagonists + antagonists = [subprocess.Popen(['tools/run_tests/antagonist.py']) + for _ in range(0, args.antagonists)] + try: + # run all the tests + all_runs = itertools.chain.from_iterable( + itertools.repeat(one_run, runs_per_test)) + if not jobset.run(all_runs, check_cancelled, + newline_on_success=newline_on_success, travis=travis, + maxjobs=min(args.jobs, min(c.maxjobs for c in run_configs)), + cache=cache): + return 2 + finally: + for antagonist in antagonists: + antagonist.kill() return 0 diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index c4438e53b5..3340dd0e23 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -644,6 +644,15 @@ { "flaky": false, "language": "c++", + "name": "client_crash_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c++", "name": "credentials_test", "platforms": [ "windows", @@ -698,6 +707,15 @@ { "flaky": false, "language": "c++", + "name": "server_crash_test", + "platforms": [ + "windows", + "posix" + ] + }, + { + "flaky": false, + "language": "c++", "name": "status_test", "platforms": [ "windows", |