diff --git a/src/tests/ftest/cart/corpc/cart_corpc_five_node.py b/src/tests/ftest/cart/corpc/cart_corpc_five_node.py index 5eaab0cd35f..cbe6ce5229c 100755 --- a/src/tests/ftest/cart/corpc/cart_corpc_five_node.py +++ b/src/tests/ftest/cart/corpc/cart_corpc_five_node.py @@ -48,7 +48,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) def test_cart_corpc(self): """ @@ -61,7 +60,6 @@ def test_cart_corpc(self): self.utils.launch_test(self, cmd) - self.utils.log_copy(self) if __name__ == "__main__": main() diff --git a/src/tests/ftest/cart/corpc/cart_corpc_one_node.py b/src/tests/ftest/cart/corpc/cart_corpc_one_node.py index 25910146e49..ecaccda4b03 100755 --- a/src/tests/ftest/cart/corpc/cart_corpc_one_node.py +++ b/src/tests/ftest/cart/corpc/cart_corpc_one_node.py @@ -48,7 +48,6 @@ def setUp(self): def tearDown(self): """ Test teardown """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) def test_cart_corpc(self): """ @@ -61,7 +60,6 @@ def test_cart_corpc(self): self.utils.launch_test(self, cmd) - self.utils.log_copy(self) if __name__ == "__main__": main() diff --git a/src/tests/ftest/cart/corpc/cart_corpc_two_node.py b/src/tests/ftest/cart/corpc/cart_corpc_two_node.py index aff5b597e05..aab40edfe8d 100755 --- a/src/tests/ftest/cart/corpc/cart_corpc_two_node.py +++ b/src/tests/ftest/cart/corpc/cart_corpc_two_node.py @@ -48,8 +48,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) - self.utils.log_copy(self) def test_cart_corpc(self): """ @@ -62,7 +60,6 @@ def test_cart_corpc(self): self.utils.launch_test(self, cmd) - self.utils.log_copy(self) if __name__ == "__main__": main() diff --git a/src/tests/ftest/cart/ctl/cart_ctl_five_node.py b/src/tests/ftest/cart/ctl/cart_ctl_five_node.py index a305128912e..56f57ee080d 100755 --- a/src/tests/ftest/cart/ctl/cart_ctl_five_node.py +++ b/src/tests/ftest/cart/ctl/cart_ctl_five_node.py @@ -49,8 +49,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) - self.utils.log_copy(self) def test_cart_ctl(self): """ @@ -82,7 +80,6 @@ def test_cart_ctl(self): self.utils.stop_process(srv_rtn, self.utils) - self.utils.log_copy(self) if __name__ == "__main__": main() diff --git a/src/tests/ftest/cart/ctl/cart_ctl_one_node.py b/src/tests/ftest/cart/ctl/cart_ctl_one_node.py index e61c5bc24ee..13c703edc1b 100755 --- a/src/tests/ftest/cart/ctl/cart_ctl_one_node.py +++ b/src/tests/ftest/cart/ctl/cart_ctl_one_node.py @@ -48,8 +48,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) - self.utils.log_copy(self) def test_cart_ctl(self): """ @@ -85,7 +83,6 @@ def test_cart_ctl(self): clicmd = self.utils.build_cmd(self, self.env, "cli6") self.utils.launch_test(self, clicmd, srv_rtn) - self.utils.log_copy(self) if __name__ == "__main__": main() diff --git a/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.py b/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.py index cd14318d157..4a2b55637b9 100755 --- a/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.py +++ b/src/tests/ftest/cart/ghost_rank_rpc/cart_ghost_rank_prc_one_node.py @@ -48,8 +48,6 @@ def setUp(self): def tearDown(self): """ Test teardown """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) - self.utils.log_copy(self) def test_cart_ghost_rank_rpc(self): """ @@ -62,7 +60,6 @@ def test_cart_ghost_rank_rpc(self): self.utils.launch_test(self, cmd) - self.utils.log_copy(self) if __name__ == "__main__": main() diff --git a/src/tests/ftest/cart/group_test/group_test.py b/src/tests/ftest/cart/group_test/group_test.py index 5aa9c16483e..fd7d31ac3f2 100755 --- a/src/tests/ftest/cart/group_test/group_test.py +++ b/src/tests/ftest/cart/group_test/group_test.py @@ -50,8 +50,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.log_copy(self) - self.utils.dump_cart_logs_static(self.utils) def test_group(self): """ @@ -70,7 +68,6 @@ def test_group(self): cmd = srv_cmd self.utils.launch_test(self, cmd) - self.utils.log_copy(self) if __name__ == "__main__": main() diff --git a/src/tests/ftest/cart/iv/cart_iv_one_node.py b/src/tests/ftest/cart/iv/cart_iv_one_node.py index ef395e99435..63db8edae06 100755 --- a/src/tests/ftest/cart/iv/cart_iv_one_node.py +++ b/src/tests/ftest/cart/iv/cart_iv_one_node.py @@ -104,8 +104,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.log_copy(self) - self.utils.dump_cart_logs_static(self.utils) def _verify_action(self, action): """verify the action""" @@ -304,7 +302,6 @@ def test_cart_iv(self): if failed: self.fail("Test failed.\n") - self.utils.log_copy(self) if __name__ == "__main__": main() diff --git a/src/tests/ftest/cart/iv/cart_iv_two_node.py b/src/tests/ftest/cart/iv/cart_iv_two_node.py index df97935faa2..3fc64451a06 100755 --- a/src/tests/ftest/cart/iv/cart_iv_two_node.py +++ b/src/tests/ftest/cart/iv/cart_iv_two_node.py @@ -104,8 +104,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) - self.utils.log_copy(self) def _verify_action(self, action): """verify the action""" @@ -304,7 +302,6 @@ def test_cart_iv(self): if failed: self.fail("Test failed.\n") - self.utils.log_copy(self) if __name__ == "__main__": main() diff --git a/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.py b/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.py index f64560486f5..26c01ec1926 100755 --- a/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.py +++ b/src/tests/ftest/cart/no_pmix/cart_nopmix_multictx_one_node.py @@ -60,8 +60,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) - self.utils.log_copy(self) def test_cart_no_pmix(self): """ @@ -84,7 +82,6 @@ def test_cart_no_pmix(self): self.utils.print("Finished waiting for {}".format(p)) - self.utils.log_copy(self) if __name__ == "__main__": main() diff --git a/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.py b/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.py index 839d509036d..4ba1d22deb3 100755 --- a/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.py +++ b/src/tests/ftest/cart/nopmix_launcher/cart_nopmix_launcher_one_node.py @@ -50,8 +50,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) - self.utils.log_copy(self) def test_cart_no_pmix_launcher(self): """ diff --git a/src/tests/ftest/cart/rpc/cart_rpc_one_node.py b/src/tests/ftest/cart/rpc/cart_rpc_one_node.py index 4774dc14fc0..a6970e88cf7 100755 --- a/src/tests/ftest/cart/rpc/cart_rpc_one_node.py +++ b/src/tests/ftest/cart/rpc/cart_rpc_one_node.py @@ -48,8 +48,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) - self.utils.log_copy(self) def test_cart_rpc(self): """ @@ -61,7 +59,6 @@ def test_cart_rpc(self): clicmd = self.utils.build_cmd(self, self.env, "test_clients") self.utils.launch_srv_cli_test(self, srvcmd, clicmd) - self.utils.log_copy(self) self.utils.log_check(self) if __name__ == "__main__": diff --git a/src/tests/ftest/cart/rpc/cart_rpc_two_node.py b/src/tests/ftest/cart/rpc/cart_rpc_two_node.py index de5c7265153..e6796201e05 100755 --- a/src/tests/ftest/cart/rpc/cart_rpc_two_node.py +++ b/src/tests/ftest/cart/rpc/cart_rpc_two_node.py @@ -48,8 +48,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) - self.utils.log_copy(self) def test_cart_rpc(self): """ @@ -61,7 +59,6 @@ def test_cart_rpc(self): clicmd = self.utils.build_cmd(self, self.env, "test_clients") self.utils.launch_srv_cli_test(self, srvcmd, clicmd) - self.utils.log_copy(self) self.utils.log_check(self) if __name__ == "__main__": diff --git a/src/tests/ftest/cart/selftest/cart_selftest_three_node.py b/src/tests/ftest/cart/selftest/cart_selftest_three_node.py index 1d8130d64d0..fa7a9e3fc83 100755 --- a/src/tests/ftest/cart/selftest/cart_selftest_three_node.py +++ b/src/tests/ftest/cart/selftest/cart_selftest_three_node.py @@ -48,8 +48,6 @@ def setUp(self): def tearDown(self): """ Test tear down """ print("Run TearDown\n") - self.utils.dump_cart_logs_static(self.utils) - self.utils.log_copy(self) def test_cart_selftest(self): """ @@ -79,7 +77,6 @@ def test_cart_selftest(self): clicmd = self.utils.build_cmd(self, self.env, "cli3") self.utils.launch_test(self, clicmd, srv_rtn) - self.utils.log_copy(self) if __name__ == "__main__": main() diff --git a/src/tests/ftest/cart/util/cart_utils.py b/src/tests/ftest/cart/util/cart_utils.py index dfa4e3cef14..42c15cf3560 100755 --- a/src/tests/ftest/cart/util/cart_utils.py +++ b/src/tests/ftest/cart/util/cart_utils.py @@ -130,10 +130,6 @@ def stop_process(proc, self): except Exception: proc.kill() - # Putting this in the tearDown section of the test .py file, might - # not be enough. Copy logs over when test procs are reaped. - self.dump_cart_logs() - return procrtn def get_env(self, cartobj): @@ -423,28 +419,6 @@ def print(self, cmd): self.stdout.info(cmd) self.progress_log.info(cmd) - @staticmethod - def log_copy(cartobj): - print("Entering log_copy") - """Copy cart log files to Jenkins-accessible directory """ - - import shutil - import tempfile - - print("Copy log path", cartobj.log_path, " to ", os.environ["AVOCADO_TEST_LOGDIR"]) - # Copy log files to jenkins dir - - # Source path - src = cartobj.log_path - - # Destination path - _dest = os.environ["AVOCADO_TEST_LOGDIR"] - dest = tempfile.mkdtemp(dir = _dest) - - # Copy the content of source to destination - rc = shutil.copytree(src, dest + "-testLogs") - print("shutil.copytree: ", src, " to ", dest, ", rc = ", rc) - @staticmethod def log_check(cartobj): print("Entering log_check") @@ -470,57 +444,3 @@ def log_check(cartobj): cl = cart_logparse.LogIter(log_file) c_log_test = cart_logtest.LogTest(cl) c_log_test.check_log_file(strict_test) - - def dump_cart_logs(self): - print("Entering dump_cart_logs") - """Print contents of cart.log - - Returns: - void - """ - - if self.cart_logs_dumped_already: - print ("We already dumped the cart.log. No need to repeat.") - return - - pattern = 'cart.log*' - - # DEBUGGING - import os - print("\ndump_cart_logs:483: ENV : %s\n" % os.environ) - print("\ndump_cart_logs:483: os.getcwd() : %s\n" % os.getcwd()) - - # Find the cart.log in one of these directories (which might differ between - # different testing environments) - directories = [ - '.', - os.environ["AVOCADO_TEST_LOGDIR"], - os.environ["AVOCADO_TEST_OUTPUTDIR"], - os.environ["AVOCADO_TEST_WORKDIR"], - os.environ["AVOCADO_TESTS_COMMON_TMPDIR"] - ] - - for directory in directories: - print("Line 492: for directory ", directory) - for root, dirs, files in os.walk(directory): - print("Line 492: for root: ", root) - for basename in files: - print("Line 492: for basename: ", basename) - if fnmatch.fnmatch(basename, pattern): - filename = os.path.join(root, basename) - print('Found cart.log file: ', filename) - log = open(filename, "r").read() - print(log) - self.cart_logs_dumped_already = True - - # Assume there's only one cart.log per test process - return - - @staticmethod - def dump_cart_logs_static(self): - """Static wrapper for dump_cart_logs - - Returns: - void - """ - self.dump_cart_logs()