From 4004d776b01a1b038df52ca45b18430da1b6b1f5 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Fri, 2 Apr 2021 09:52:38 +0200 Subject: Properly manage e2e parallel testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It sets nodes=25 to run all tests in parallel. It also beautifies all testcases.yml Change-Id: I3ecd8899e957c0efbef34ab0409c2b4d557c9425 Signed-off-by: Cédric Ollivier --- functest_kubernetes/k8stest.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'functest_kubernetes') diff --git a/functest_kubernetes/k8stest.py b/functest_kubernetes/k8stest.py index 7e629ec9..740a3b93 100644 --- a/functest_kubernetes/k8stest.py +++ b/functest_kubernetes/k8stest.py @@ -47,10 +47,13 @@ class E2ETesting(testcase.TestCase): def run_kubetest(self, **kwargs): # pylint: disable=too-many-branches """Run the test suites""" - cmd_line = ['e2e.test', '-ginkgo.noColor', '-kubeconfig', self.config, - '-provider', 'skeleton', '-report-dir', self.res_dir] - for arg in kwargs: - cmd_line.extend(['-ginkgo.{}'.format(arg), kwargs.get(arg)]) + cmd_line = [ + 'ginkgo', '--nodes={}'.format(kwargs.get("nodes", 1)), + '--noColor', '/usr/local/bin/e2e.test', '--', + '-kubeconfig', self.config, + '-provider', 'skeleton', '-report-dir', self.res_dir] + for arg in kwargs.get("ginkgo", {}): + cmd_line.extend(['-ginkgo.{}'.format(arg), kwargs["ginkgo"][arg]]) if "NON_BLOCKING_TAINTS" in os.environ: cmd_line.extend( ['-non-blocking-taints', os.environ["NON_BLOCKING_TAINTS"]]) @@ -58,7 +61,6 @@ class E2ETesting(testcase.TestCase): self._generate_repo_list_file() self.__logger.info("Starting k8s test: '%s'.", cmd_line) env = os.environ.copy() - env["GINKGO_PARALLEL"] = 'y' env["KUBE_TEST_REPO_LIST"] = "{}/repositories.yml".format(self.res_dir) process = subprocess.Popen(cmd_line, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, env=env) -- cgit 1.2.3-korg