tests: make lttng_live_server.py write temp port filename in same directory
[babeltrace.git] / tests / data / plugins / src.ctf.lttng-live / lttng_live_server.py
index 5d8440292e28a2720dde6cc66dd2ffa6051dec4b..2177afa508fb09bc79c575b1888b4b4e2c0379c1 100644 (file)
@@ -1783,7 +1783,9 @@ class LttngLiveServer:
 
     def _write_port_to_file(self, port_filename: str):
         # Write the port number to a temporary file.
-        with tempfile.NamedTemporaryFile(mode="w", delete=False) as tmp_port_file:
+        with tempfile.NamedTemporaryFile(
+            mode="w", delete=False, dir=os.path.dirname(port_filename)
+        ) as tmp_port_file:
             print(self._server_port, end="", file=tmp_port_file)
 
         # Rename temporary file to real file
This page took 0.023735 seconds and 4 git commands to generate.