diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-09-19 20:02:21 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-09-19 21:07:07 +0200 |
commit | 7646673d496c3a4efc71dcebbfb00f8ff3494944 (patch) | |
tree | 43c215630d71c7a2d8ebdb5e4dd05be0c9262450 | |
parent | 16b22c8ec9b86d6dcee529e5cc99810d018b1a24 (diff) |
remove the OSL_PIPE_$uid_pytest_foo on killing process
we pass this name to soffice ourself, so we know what the final name
of the pipe will be, so we can remove it ourself
Change-Id: I8d98f8464a203278da09b20be5c7d76f85a6d437
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/140205
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | test-bugzilla-files/test-bugzilla-files.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test-bugzilla-files/test-bugzilla-files.py b/test-bugzilla-files/test-bugzilla-files.py index ec3d492d..50a75086 100644 --- a/test-bugzilla-files/test-bugzilla-files.py +++ b/test-bugzilla-files/test-bugzilla-files.py @@ -83,6 +83,7 @@ class OfficeConnection: self.args = args self.soffice = None self.socket = None + self.pipename = None self.xContext = None self.pro = None self.suicided = False @@ -91,7 +92,8 @@ class OfficeConnection: if sep != ":": raise Exception("soffice parameter does not specify method") if method == "path": - socket = "pipe,name=pytest" + str(uuid.uuid1()) + self.pipename = "pytest" + str(uuid.uuid1()) + socket = "pipe,name=" + self.pipename try: userdir = self.args["--userdir"] except KeyError: @@ -159,6 +161,9 @@ class OfficeConnection: # return ret def kill(self): self.suicided = True + command = "rm /tmp/OSL_PIPE_" + str(os.getuid()) + "_" + self.pipename; + print(command) + os.system(command) command = "kill " + str(self.pro.pid) killFile = open("killFile.log", "a") killFile.write(command + "\n") |