From 71d02aa63183a513dbca98fa53719f7e29271faa Mon Sep 17 00:00:00 2001 From: Dmitry Valter Date: Fri, 27 Jan 2023 12:49:55 +0000 Subject: tests: support tmp-dir on different filesystem Support running tests with `--tmp-dir` on a filesystem different from /tmp. os.rename withs only within a single FS whereas shutil.move works accross different filesystems. Type: improvement Signed-off-by: Dmitry Valter Change-Id: I5371f5d75386bd2b82a75b3e6c1f2c850bc62356 --- test/framework.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/framework.py') diff --git a/test/framework.py b/test/framework.py index a7a3e2fdea7..f90aa43c9f2 100644 --- a/test/framework.py +++ b/test/framework.py @@ -931,7 +931,7 @@ class VppTestCase(CPUInterface, unittest.TestCase): vpp_api_trace_log = "%s/%s" % (self.tempdir, api_trace) self.logger.info(self.vapi.ppcli("api trace save %s" % api_trace)) self.logger.info("Moving %s to %s\n" % (tmp_api_trace, vpp_api_trace_log)) - os.rename(tmp_api_trace, vpp_api_trace_log) + shutil.move(tmp_api_trace, vpp_api_trace_log) except VppTransportSocketIOError: self.logger.debug( "VppTransportSocketIOError: Vpp dead. Cannot log show commands." -- cgit 1.2.3-korg