aboutsummaryrefslogtreecommitdiffstats
path: root/library
diff options
context:
space:
mode:
authorakastornov <akastornov@yandex-team.ru>2022-02-10 16:46:03 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:03 +0300
commit3a2de774d91ca8d7325aaf81c200b1d2047725e6 (patch)
tree5674a780ce03a8bbd794733a19c7a70d587e4a14 /library
parent7bd11ff35e97544d119e43447e3e865f2588ee7f (diff)
downloadydb-3a2de774d91ca8d7325aaf81c200b1d2047725e6.tar.gz
Restoring authorship annotation for <akastornov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library')
-rw-r--r--library/cpp/messagebus/monitoring/ya.make2
-rw-r--r--library/python/pytest/yatest_tools.py40
-rw-r--r--library/python/testing/yatest_common/yatest/common/process.py6
-rw-r--r--library/python/testing/yatest_common/yatest/common/runtime.py14
-rw-r--r--library/python/testing/yatest_common/yatest/common/runtime_java.py44
5 files changed, 53 insertions, 53 deletions
diff --git a/library/cpp/messagebus/monitoring/ya.make b/library/cpp/messagebus/monitoring/ya.make
index 25782492b1..7834b786b8 100644
--- a/library/cpp/messagebus/monitoring/ya.make
+++ b/library/cpp/messagebus/monitoring/ya.make
@@ -1,4 +1,4 @@
-PROTO_LIBRARY()
+PROTO_LIBRARY()
OWNER(g:messagebus)
diff --git a/library/python/pytest/yatest_tools.py b/library/python/pytest/yatest_tools.py
index 6b8b896394..f9f54aab5a 100644
--- a/library/python/pytest/yatest_tools.py
+++ b/library/python/pytest/yatest_tools.py
@@ -51,34 +51,34 @@ class Subtest(object):
class SubtestInfo(object):
- skipped_prefix = '[SKIPPED] '
-
+ skipped_prefix = '[SKIPPED] '
+
@classmethod
def from_str(cls, s):
- if s.startswith(SubtestInfo.skipped_prefix):
- s = s[len(SubtestInfo.skipped_prefix):]
- skipped = True
-
- else:
- skipped = False
-
- return SubtestInfo(*s.rsplit(TEST_SUBTEST_SEPARATOR, 1), skipped=skipped)
-
- def __init__(self, test, subtest="", skipped=False, **kwargs):
+ if s.startswith(SubtestInfo.skipped_prefix):
+ s = s[len(SubtestInfo.skipped_prefix):]
+ skipped = True
+
+ else:
+ skipped = False
+
+ return SubtestInfo(*s.rsplit(TEST_SUBTEST_SEPARATOR, 1), skipped=skipped)
+
+ def __init__(self, test, subtest="", skipped=False, **kwargs):
self.test = test
self.subtest = subtest
- self.skipped = skipped
+ self.skipped = skipped
for key, value in kwargs.iteritems():
setattr(self, key, value)
def __str__(self):
- s = ''
-
- if self.skipped:
- s += SubtestInfo.skipped_prefix
-
- return s + TEST_SUBTEST_SEPARATOR.join([self.test, self.subtest])
+ s = ''
+ if self.skipped:
+ s += SubtestInfo.skipped_prefix
+
+ return s + TEST_SUBTEST_SEPARATOR.join([self.test, self.subtest])
+
def __repr__(self):
return str(self)
@@ -229,7 +229,7 @@ def escape_for_fnmatch(s):
def get_python_cmd(opts=None, use_huge=True, suite=None):
- if opts and getattr(opts, 'flags', {}).get("USE_ARCADIA_PYTHON") == "no":
+ if opts and getattr(opts, 'flags', {}).get("USE_ARCADIA_PYTHON") == "no":
return ["python"]
if suite and not suite._use_arcadia_python:
return ["python"]
diff --git a/library/python/testing/yatest_common/yatest/common/process.py b/library/python/testing/yatest_common/yatest/common/process.py
index a8bcc21f51..1eccd97cde 100644
--- a/library/python/testing/yatest_common/yatest/common/process.py
+++ b/library/python/testing/yatest_common/yatest/common/process.py
@@ -29,8 +29,8 @@ MAX_MESSAGE_LEN = 1500
SANITIZER_ERROR_PATTERN = br": ([A-Z][\w]+Sanitizer)"
GLIBC_PATTERN = re.compile(r"\S+@GLIBC_([0-9.]+)")
yatest_logger = logging.getLogger("ya.test")
-
-
+
+
def truncate(s, size):
if s is None:
return None
@@ -625,7 +625,7 @@ def wait_for(check_function, timeout, fail_message="", sleep_time=1.0, on_check_
message += ": {}".format(fail_message)
raise TimeoutError(truncate(message, MAX_MESSAGE_LEN))
-
+
def _kill_process_tree(process_pid, target_pid_signal=None):
"""
Kills child processes, req. Note that psutil should be installed
diff --git a/library/python/testing/yatest_common/yatest/common/runtime.py b/library/python/testing/yatest_common/yatest/common/runtime.py
index e55e193446..064923c9ce 100644
--- a/library/python/testing/yatest_common/yatest/common/runtime.py
+++ b/library/python/testing/yatest_common/yatest/common/runtime.py
@@ -77,15 +77,15 @@ def build_path(path=None):
return _join_path(_get_ya_plugin_instance().build_root, path)
-def java_path():
- """
+def java_path():
+ """
[DEPRECATED] Get path to java
- :return: absolute path to java
- """
+ :return: absolute path to java
+ """
from . import runtime_java
- return runtime_java.get_java_path(binary_path(os.path.join('contrib', 'tools', 'jdk')))
-
-
+ return runtime_java.get_java_path(binary_path(os.path.join('contrib', 'tools', 'jdk')))
+
+
def java_home():
"""
Get jdk directory path
diff --git a/library/python/testing/yatest_common/yatest/common/runtime_java.py b/library/python/testing/yatest_common/yatest/common/runtime_java.py
index 39bbb45570..88d27b8b79 100644
--- a/library/python/testing/yatest_common/yatest/common/runtime_java.py
+++ b/library/python/testing/yatest_common/yatest/common/runtime_java.py
@@ -1,30 +1,30 @@
-import os
-import tarfile
-import contextlib
-
+import os
+import tarfile
+import contextlib
+
from . import runtime
-
+
_JAVA_DIR = []
-def get_java_path(jdk_dir):
+def get_java_path(jdk_dir):
# deprecated - to be deleted
- java_paths = (os.path.join(jdk_dir, 'bin', 'java'), os.path.join(jdk_dir, 'bin', 'java.exe'))
-
- for p in java_paths:
- if os.path.exists(p):
- return p
-
- for f in os.listdir(jdk_dir):
- if f.endswith('.tar'):
- with contextlib.closing(tarfile.open(os.path.join(jdk_dir, f))) as tf:
- tf.extractall(jdk_dir)
-
- for p in java_paths:
- if os.path.exists(p):
- return p
-
- return ''
+ java_paths = (os.path.join(jdk_dir, 'bin', 'java'), os.path.join(jdk_dir, 'bin', 'java.exe'))
+
+ for p in java_paths:
+ if os.path.exists(p):
+ return p
+
+ for f in os.listdir(jdk_dir):
+ if f.endswith('.tar'):
+ with contextlib.closing(tarfile.open(os.path.join(jdk_dir, f))) as tf:
+ tf.extractall(jdk_dir)
+
+ for p in java_paths:
+ if os.path.exists(p):
+ return p
+
+ return ''
def get_build_java_dir(jdk_dir):