Imported Upstream version 1.27.0
[platform/upstream/grpc.git] / tools / run_tests / artifacts / distribtest_targets.py
index 403a858..337a25a 100644 (file)
@@ -27,7 +27,8 @@ def create_docker_jobspec(name,
                           environ={},
                           flake_retries=0,
                           timeout_retries=0,
-                          copy_rel_path=None):
+                          copy_rel_path=None,
+                          timeout_seconds=30 * 60):
     """Creates jobspec for a task running under docker."""
     environ = environ.copy()
     environ['RUN_COMMAND'] = shell_command
@@ -47,7 +48,7 @@ def create_docker_jobspec(name,
         docker_args,
         environ=docker_env,
         shortname='distribtest.%s' % (name),
-        timeout_seconds=30 * 60,
+        timeout_seconds=timeout_seconds,
         flake_retries=flake_retries,
         timeout_retries=timeout_retries)
     return jobspec
@@ -67,14 +68,13 @@ def create_jobspec(name,
         environ['WORKSPACE_NAME'] = 'workspace_%s' % name
         cmdline = ['bash', 'tools/run_tests/artifacts/run_in_workspace.sh'
                   ] + cmdline
-    jobspec = jobset.JobSpec(
-        cmdline=cmdline,
-        environ=environ,
-        shortname='distribtest.%s' % (name),
-        timeout_seconds=timeout_seconds,
-        flake_retries=flake_retries,
-        timeout_retries=timeout_retries,
-        shell=shell)
+    jobspec = jobset.JobSpec(cmdline=cmdline,
+                             environ=environ,
+                             shortname='distribtest.%s' % (name),
+                             timeout_seconds=timeout_seconds,
+                             flake_retries=flake_retries,
+                             timeout_retries=timeout_retries,
+                             shell=shell)
     return jobspec
 
 
@@ -112,13 +112,11 @@ class CSharpDistribTest(object):
                 self.script_suffix,
                 copy_rel_path='test/distrib')
         elif self.platform == 'macos':
-            return create_jobspec(
-                self.name, [
-                    'test/distrib/csharp/run_distrib_test%s.sh' %
-                    self.script_suffix
-                ],
-                environ={'EXTERNAL_GIT_ROOT': '../../../..'},
-                use_workspace=True)
+            return create_jobspec(self.name, [
+                'test/distrib/csharp/run_distrib_test%s.sh' % self.script_suffix
+            ],
+                                  environ={'EXTERNAL_GIT_ROOT': '../../../..'},
+                                  use_workspace=True)
         elif self.platform == 'windows':
             if self.arch == 'x64':
                 # Use double leading / as the first occurrence gets removed by msys bash
@@ -129,13 +127,12 @@ class CSharpDistribTest(object):
                 }
             else:
                 environ = {'DISTRIBTEST_OUTPATH': 'DistribTest\\bin\\Debug'}
-            return create_jobspec(
-                self.name, [
-                    'test\\distrib\\csharp\\run_distrib_test%s.bat' %
-                    self.script_suffix
-                ],
-                environ=environ,
-                use_workspace=True)
+            return create_jobspec(self.name, [
+                'test\\distrib\\csharp\\run_distrib_test%s.bat' %
+                self.script_suffix
+            ],
+                                  environ=environ,
+                                  use_workspace=True)
         else:
             raise Exception("Not supported yet.")
 
@@ -238,8 +235,8 @@ class PHPDistribTest(object):
         if self.platform == 'linux':
             return create_docker_jobspec(
                 self.name,
-                'tools/dockerfile/distribtest/php_%s_%s' % (self.docker_suffix,
-                                                            self.arch),
+                'tools/dockerfile/distribtest/php_%s_%s' %
+                (self.docker_suffix, self.arch),
                 'test/distrib/php/run_distrib_test.sh',
                 copy_rel_path='test/distrib')
         elif self.platform == 'macos':
@@ -277,9 +274,11 @@ class CppDistribTest(object):
     def build_jobspec(self):
         if self.platform == 'linux':
             return create_docker_jobspec(
-                self.name, 'tools/dockerfile/distribtest/cpp_%s_%s' %
+                self.name,
+                'tools/dockerfile/distribtest/cpp_%s_%s' %
                 (self.docker_suffix, self.arch),
-                'test/distrib/cpp/run_distrib_test_%s.sh' % self.testcase)
+                'test/distrib/cpp/run_distrib_test_%s.sh' % self.testcase,
+                timeout_seconds=45 * 60)
         elif self.platform == 'windows':
             return create_jobspec(
                 self.name,
@@ -301,7 +300,10 @@ def targets():
         CppDistribTest('linux', 'x64', 'jessie', 'cmake'),
         CppDistribTest('linux', 'x64', 'jessie', 'cmake_as_externalproject'),
         CppDistribTest('linux', 'x64', 'jessie', 'cmake_as_submodule'),
+        CppDistribTest('linux', 'x64', 'jessie', 'cmake_fetchcontent'),
+        CppDistribTest('linux', 'x64', 'jessie', 'cmake_module_install'),
         CppDistribTest('linux', 'x64', 'jessie', 'cmake_pkgconfig'),
+        CppDistribTest('linux', 'x64', 'jessie', 'raspberry_pi'),
         CppDistribTest('windows', 'x86', testcase='cmake'),
         CppDistribTest('windows', 'x86', testcase='cmake_as_externalproject'),
         CSharpDistribTest('linux', 'x64', 'jessie'),