* [PATCH] CI: Use shutil for file operations
@ 2024-01-16 11:49 Anton Mikanovich
2024-01-23 9:11 ` Uladzimir Bely
0 siblings, 1 reply; 2+ messages in thread
From: Anton Mikanovich @ 2024-01-16 11:49 UTC (permalink / raw)
To: isar-users; +Cc: Anton Mikanovich
Migrate to shutil to avoid overhead on process API.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
testsuite/cibuilder.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/testsuite/cibuilder.py b/testsuite/cibuilder.py
index 2b784ef9..bb62bb8d 100755
--- a/testsuite/cibuilder.py
+++ b/testsuite/cibuilder.py
@@ -181,11 +181,12 @@ class CIBuilder(Test):
def delete_from_build_dir(self, path):
self.check_init()
- process.run('rm -rf ' + self.build_dir + '/' + path, sudo=True)
+ shutil.rmtree(self.build_dir + '/' + path, True)
def move_in_build_dir(self, src, dst):
self.check_init()
- process.run('mv ' + self.build_dir + '/' + src + ' ' + self.build_dir + '/' + dst, sudo=True)
+ if os.path.exists(self.build_dir + '/' + src):
+ shutil.move(self.build_dir + '/' + src, self.build_dir + '/' + dst)
def bitbake(self, target, bitbake_cmd=None, **kwargs):
self.check_init()
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] CI: Use shutil for file operations
2024-01-16 11:49 [PATCH] CI: Use shutil for file operations Anton Mikanovich
@ 2024-01-23 9:11 ` Uladzimir Bely
0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2024-01-23 9:11 UTC (permalink / raw)
To: Anton Mikanovich, isar-users
On Tue, 2024-01-16 at 13:49 +0200, Anton Mikanovich wrote:
> Migrate to shutil to avoid overhead on process API.
>
> Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
> ---
> testsuite/cibuilder.py | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
Applied to next.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-23 9:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 11:49 [PATCH] CI: Use shutil for file operations Anton Mikanovich
2024-01-23 9:11 ` Uladzimir Bely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox