Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions cloud/storage/core/tools/testing/virtiofs_server/bin/cp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import shutil
import sys

if len(sys.argv) != 3:
print("Usage: python cp.py <src> <dst>")
sys.exit(1)

src = sys.argv[1]
dst = sys.argv[2]

try:
shutil.copy2(src, dst)
print("Symlink created.")
except Exception as e:
print(f"Failed: {e}")
9 changes: 9 additions & 0 deletions cloud/storage/core/tools/testing/virtiofs_server/bin/ya.make
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
PACKAGE()

IF(USE_SYSTEM_VIRTIOFSD)
RUN_PYTHON3(
cp.py /usr/lib/qemu/virtiofsd virtiofs-server
OUT virtiofs-server
)
ELSE()

FROM_SANDBOX(
FILE
4556399018
RENAME RESOURCE
OUT_NOAUTO virtiofs-server
EXECUTABLE)

ENDIF()

END()
6 changes: 6 additions & 0 deletions cloud/storage/core/tools/testing/ydb/bin/ya.make
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
IF(USE_BUNDLED_YDBD)
INCLUDE(${ARCADIA_ROOT}/contrib/ydb/apps/ydbd/ya.make)
ELSE()

PACKAGE()

FROM_SANDBOX(
Expand All @@ -8,3 +12,5 @@ FROM_SANDBOX(
)

END()

ENDIF()
4 changes: 4 additions & 0 deletions contrib/ydb/apps/ydbd/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ IF (OS_WINDOWS)
)
ENDIF()

SRCDIR(
contrib/ydb/apps/ydbd
)

SRCS(
export.cpp
export.h
Expand Down
38 changes: 38 additions & 0 deletions tools/flake8_linter/bin/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/usr/bin/env python3

# Fake Flake8 Linter: just writes empty result file

import sys
import os
import json


def main():
args = sys.argv
for i, arg in enumerate(args):
print(arg)
# Check if the argument is an existing file
if os.path.isfile(arg) and i > 0 and args[i - 1].startswith("--params"):
# Sample contents: {"source_root": "$(SOURCE_ROOT)", "project_path": "cloud/filestore/tests/profile_log/replay", "output_path": "/home/nbsci/nbs/cloud/filestore/tests/profile_log/replay/test-results/flake8/testing_out_stuff", "lint_name": "flake8", "files": ["cloud/filestore/tests/profile_log/replay/test.py", "cloud/filestore/tests/profile_log/replay/test_grpc.py"], "depends": {"cloud/filestore/tests/profile_log/replay": "/home/nbsci/nbs/cloud/filestore/tests/profile_log/replay", "tools/flake8_linter/flake8_linter": "/home/nbsci/nbs/tools/flake8_linter/flake8_linter"}, "global_resources": {"FLAKE8_PY3_RESOURCE_GLOBAL": "/home/nbsci/.ya/tools/v3/3968796477", "LLD_ROOT_RESOURCE_GLOBAL": "/home/nbsci/.ya/tools/v3/5458408674", "OS_SDK_ROOT_RESOURCE_GLOBAL": "/home/nbsci/.ya/tools/v3/309054781"}, "configs": ["build/config/tests/flake8/flake8.conf"], "extra_params": {"DISABLE_FLAKE8_MIGRATIONS": "yes"}, "report_file": "/home/nbsci/nbs/cloud/filestore/tests/profile_log/replay/test-results/flake8/testing_out_stuff/linter_report.json"}
try:
with open(arg, "r") as file:
contents = file.read()

# Parse JSON and write {} to report_file
params = json.loads(contents)
report_file = params.get("report_file")
if report_file:
# Ensure the directory exists
os.makedirs(os.path.dirname(report_file), exist_ok=True)
# Write empty JSON object to report file
with open(report_file, "w") as f:
f.write('{"report":{}}')
print(f"Written '{...}' to {report_file}")
else:
print("No report_file found in params")
except Exception as e:
print(f"Error processing file {arg}: {e}")


if __name__ == "__main__":
main()
11 changes: 11 additions & 0 deletions tools/flake8_linter/bin/ya.make
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PY3_PROGRAM(flake8_linter)

SRCDIR(
tools/flake8_linter/bin
)

PY_SRCS(
__main__.py
)

END()
6 changes: 4 additions & 2 deletions tools/flake8_linter/ya.make
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
IF (USE_PREBUILT_TOOLS OR OPENSOURCE)
INCLUDE(${ARCADIA_ROOT}/build/prebuilt/tools/flake8_linter/ya.make.prebuilt)
IF (NOT FORCE_BUILD_FLAKE8_LINTER)
IF (USE_PREBUILT_TOOLS OR OPENSOURCE)
INCLUDE(${ARCADIA_ROOT}/build/prebuilt/tools/flake8_linter/ya.make.prebuilt)
ENDIF()
ENDIF()

IF (NOT PREBUILT)
Expand Down
Loading