aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita-Levuskin <81382697+Nikita-Levuskin@users.noreply.github.com>2024-08-09 10:10:25 +0300
committerGitHub <noreply@github.com>2024-08-09 10:10:25 +0300
commitd551911383123e538da183c48b1bf30640b2bfcd (patch)
tree14692b79e69874a83e7473d1c8cad082301018c7
parentdd9f3fdcfec5d41d073bb2e43ce270088db3b630 (diff)
downloadydb-d551911383123e538da183c48b1bf30640b2bfcd.tar.gz
added functionality for the "--dont-use-log-files" flag (#7185)
-rw-r--r--ydb/public/tools/lib/cmds/__init__.py2
-rw-r--r--ydb/tests/library/harness/daemon.py14
-rw-r--r--ydb/tests/library/harness/kikimr_runner.py7
3 files changed, 8 insertions, 15 deletions
diff --git a/ydb/public/tools/lib/cmds/__init__.py b/ydb/public/tools/lib/cmds/__init__.py
index 6832ed6d0c..227a359706 100644
--- a/ydb/public/tools/lib/cmds/__init__.py
+++ b/ydb/public/tools/lib/cmds/__init__.py
@@ -388,7 +388,6 @@ def deploy(arguments):
'mon_port': node.mon_port,
'command': node.command,
'cwd': node.cwd,
- 'stdin_file': node.stdin_file_name,
'stderr_file': node.stderr_file_name,
'stdout_file': node.stdout_file_name,
'pdisks': [
@@ -471,7 +470,6 @@ def start(arguments):
files = {}
if node_meta['stderr_file'] is not None and os.path.exists(node_meta['stderr_file']):
files = {
- 'stdin_file': node_meta['stdin_file'],
'stderr_file': node_meta['stderr_file'],
'stdout_file': node_meta['stdout_file'],
}
diff --git a/ydb/tests/library/harness/daemon.py b/ydb/tests/library/harness/daemon.py
index 8e6ec5f567..5cb61b4b53 100644
--- a/ydb/tests/library/harness/daemon.py
+++ b/ydb/tests/library/harness/daemon.py
@@ -59,7 +59,6 @@ class Daemon(object):
command,
cwd,
timeout,
- stdin_file=yatest_common.work_path('stdin'),
stdout_file=yatest_common.work_path('stdout'),
stderr_file=yatest_common.work_path('stderr'),
stderr_on_error_lines=0,
@@ -73,22 +72,14 @@ class Daemon(object):
self.killed = False
self.__core_pattern = core_pattern
self.logger = logger.getChild(self.__class__.__name__)
- self.__stdout_file = open(stdout_file, mode='w+b')
- self.__stdin_file = open(stdin_file, mode='w+b')
- self.__stderr_file = open(stderr_file, mode='w+b')
+ self.__stdout_file = open(stdout_file, mode='wb')
+ self.__stderr_file = open(stderr_file, mode='wb')
@property
def daemon(self):
return self.__daemon
@property
- def stdin_file_name(self):
- if self.__stdin_file is not sys.stdin:
- return os.path.abspath(self.__stdin_file.name)
- else:
- return None
-
- @property
def stdout_file_name(self):
if self.__stdout_file is not sys.stdout:
return os.path.abspath(self.__stdout_file.name)
@@ -115,7 +106,6 @@ class Daemon(object):
self.__command,
check_exit_code=False,
cwd=self.__cwd,
- stdin=self.__stdin_file,
stdout=self.__stdout_file,
stderr=stderr_stream,
wait=False,
diff --git a/ydb/tests/library/harness/kikimr_runner.py b/ydb/tests/library/harness/kikimr_runner.py
index b6f6c50660..103a95651b 100644
--- a/ydb/tests/library/harness/kikimr_runner.py
+++ b/ydb/tests/library/harness/kikimr_runner.py
@@ -77,10 +77,15 @@ class KiKiMRNode(daemon.Daemon, kikimr_node_interface.NodeInterface):
if configurator.use_log_files:
self.__log_file = tempfile.NamedTemporaryFile(dir=self.cwd, prefix="logfile_", suffix=".log", delete=False)
+ kwargs = {}
else:
self.__log_file = None
+ kwargs = {
+ "stdout_file": "/dev/stdout",
+ "stderr_file": "/dev/stderr"
+ }
- daemon.Daemon.__init__(self, self.command, cwd=self.cwd, timeout=180, stderr_on_error_lines=240)
+ daemon.Daemon.__init__(self, self.command, cwd=self.cwd, timeout=180, stderr_on_error_lines=240, **kwargs)
self.__binary_path = None
@property