aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIlnur Khuziev <ilnur.khuziev@yandex.ru>2022-02-10 16:46:13 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:13 +0300
commit736dcd8ca259457a136f2f9f9168c44643914323 (patch)
treeddd46a036d68bfa83aa11b892f31243ea6b068a1 /tools
parent9bf2fa2b060c9881d3135c2208c624a1dd546ecc (diff)
downloadydb-736dcd8ca259457a136f2f9f9168c44643914323.tar.gz
Restoring authorship annotation for Ilnur Khuziev <ilnur.khuziev@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'tools')
-rw-r--r--tools/archiver/alignment_test/alignment_ut.cpp64
-rw-r--r--tools/archiver/alignment_test/data_file.txt2
-rw-r--r--tools/archiver/alignment_test/data_file2.txt2
-rw-r--r--tools/archiver/alignment_test/ya.make58
-rw-r--r--tools/archiver/main.cpp42
-rw-r--r--tools/archiver/tests/test.py4
-rw-r--r--tools/archiver/ya.make2
-rw-r--r--tools/enum_parser/enum_parser/main.cpp2
-rw-r--r--tools/fix_elf/patch.cpp2
-rw-r--r--tools/ya.make2
10 files changed, 90 insertions, 90 deletions
diff --git a/tools/archiver/alignment_test/alignment_ut.cpp b/tools/archiver/alignment_test/alignment_ut.cpp
index 88b07e19b0..f08c9e9c1e 100644
--- a/tools/archiver/alignment_test/alignment_ut.cpp
+++ b/tools/archiver/alignment_test/alignment_ut.cpp
@@ -1,41 +1,41 @@
-#include <library/cpp/testing/unittest/registar.h>
+#include <library/cpp/testing/unittest/registar.h>
#include <library/cpp/archive/yarchive.h>
-#include <util/memory/blob.h>
-
-extern "C" {
- extern const ui8 ArchiveAsm[];
- extern const ui32 ArchiveAsmSize;
-}
-
-static const unsigned char SimpleArchive[] = {
- #include <tools/archiver/alignment_test/simple_archive.inc>
-};
-
-
-Y_UNIT_TEST_SUITE(AlignmentTest) {
- Y_UNIT_TEST(SimpleArchiveCheck) {
- UNIT_ASSERT_VALUES_EQUAL(size_t(SimpleArchive) % ArchiveWriterDefaultDataAlignment, 0);
- TArchiveReader dataArchive(
- TBlob::NoCopy(SimpleArchive, sizeof(SimpleArchive))
- );
- auto dataFile1 = dataArchive.BlobByKey("/data_file.txt");
- auto dataFile2 = dataArchive.BlobByKey("/data_file2.txt");
+#include <util/memory/blob.h>
+
+extern "C" {
+ extern const ui8 ArchiveAsm[];
+ extern const ui32 ArchiveAsmSize;
+}
+
+static const unsigned char SimpleArchive[] = {
+ #include <tools/archiver/alignment_test/simple_archive.inc>
+};
+
+
+Y_UNIT_TEST_SUITE(AlignmentTest) {
+ Y_UNIT_TEST(SimpleArchiveCheck) {
+ UNIT_ASSERT_VALUES_EQUAL(size_t(SimpleArchive) % ArchiveWriterDefaultDataAlignment, 0);
+ TArchiveReader dataArchive(
+ TBlob::NoCopy(SimpleArchive, sizeof(SimpleArchive))
+ );
+ auto dataFile1 = dataArchive.BlobByKey("/data_file.txt");
+ auto dataFile2 = dataArchive.BlobByKey("/data_file2.txt");
UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile1.AsCharPtr(), dataFile1.Size()), "some text\n");
UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile2.AsCharPtr(), dataFile2.Size()), "second file content\n");
UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile1.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile2.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
- }
-
- Y_UNIT_TEST(ArchiveAsmCheck) {
- UNIT_ASSERT_VALUES_EQUAL(size_t(ArchiveAsm) % ArchiveWriterDefaultDataAlignment, 0);
- TArchiveReader dataArchive(
- TBlob::NoCopy(ArchiveAsm, ArchiveAsmSize)
- );
- auto dataFile1 = dataArchive.BlobByKey("/data_file.txt");
- auto dataFile2 = dataArchive.BlobByKey("/data_file2.txt");
+ }
+
+ Y_UNIT_TEST(ArchiveAsmCheck) {
+ UNIT_ASSERT_VALUES_EQUAL(size_t(ArchiveAsm) % ArchiveWriterDefaultDataAlignment, 0);
+ TArchiveReader dataArchive(
+ TBlob::NoCopy(ArchiveAsm, ArchiveAsmSize)
+ );
+ auto dataFile1 = dataArchive.BlobByKey("/data_file.txt");
+ auto dataFile2 = dataArchive.BlobByKey("/data_file2.txt");
UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile1.AsCharPtr(), dataFile1.Size()), "some text\n");
UNIT_ASSERT_NO_DIFF(TStringBuf(dataFile2.AsCharPtr(), dataFile2.Size()), "second file content\n");
UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile1.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
UNIT_ASSERT_VALUES_EQUAL(size_t(dataFile2.AsCharPtr()) % ArchiveWriterDefaultDataAlignment, 0);
- }
-}
+ }
+}
diff --git a/tools/archiver/alignment_test/data_file.txt b/tools/archiver/alignment_test/data_file.txt
index 7b57bd29ea..c3ad8fa951 100644
--- a/tools/archiver/alignment_test/data_file.txt
+++ b/tools/archiver/alignment_test/data_file.txt
@@ -1 +1 @@
-some text
+some text
diff --git a/tools/archiver/alignment_test/data_file2.txt b/tools/archiver/alignment_test/data_file2.txt
index 514211a0c1..63b9f2f9ed 100644
--- a/tools/archiver/alignment_test/data_file2.txt
+++ b/tools/archiver/alignment_test/data_file2.txt
@@ -1 +1 @@
-second file content
+second file content
diff --git a/tools/archiver/alignment_test/ya.make b/tools/archiver/alignment_test/ya.make
index 459ba58881..7407a7ab11 100644
--- a/tools/archiver/alignment_test/ya.make
+++ b/tools/archiver/alignment_test/ya.make
@@ -1,30 +1,30 @@
-UNITTEST()
-
-OWNER(
- ilnurkh
- g:ymake
-)
-
-SRCS(
- alignment_ut.cpp
-)
-
-ARCHIVE_ASM(
- NAME ArchiveAsm DONTCOMPRESS
- data_file.txt
- data_file2.txt
-)
-
-ARCHIVE(
- NAME simple_archive.inc DONTCOMPRESS
- data_file.txt
- data_file2.txt
-)
-
-
-PEERDIR(
+UNITTEST()
+
+OWNER(
+ ilnurkh
+ g:ymake
+)
+
+SRCS(
+ alignment_ut.cpp
+)
+
+ARCHIVE_ASM(
+ NAME ArchiveAsm DONTCOMPRESS
+ data_file.txt
+ data_file2.txt
+)
+
+ARCHIVE(
+ NAME simple_archive.inc DONTCOMPRESS
+ data_file.txt
+ data_file2.txt
+)
+
+
+PEERDIR(
library/cpp/archive
-)
-
-
-END()
+)
+
+
+END()
diff --git a/tools/archiver/main.cpp b/tools/archiver/main.cpp
index 6cda54c1ea..022c0884fd 100644
--- a/tools/archiver/main.cpp
+++ b/tools/archiver/main.cpp
@@ -1,7 +1,7 @@
#include <library/cpp/archive/yarchive.h>
#include <library/cpp/deprecated/mapped_file/mapped_file.h>
#include <library/cpp/digest/md5/md5.h>
-#include <library/cpp/getopt/small/last_getopt.h>
+#include <library/cpp/getopt/small/last_getopt.h>
#include <util/folder/dirut.h>
#include <util/folder/filelist.h>
@@ -414,7 +414,7 @@ namespace {
};
}
-static TString CutFirstSlash(const TString& fileName) {
+static TString CutFirstSlash(const TString& fileName) {
if (fileName[0] == '/') {
return fileName.substr(1);
} else {
@@ -441,7 +441,7 @@ static void UnpackArchive(const TString& archive, const TFsPath& dir = TFsPath()
const size_t count = reader.Count();
for (size_t i = 0; i < count; ++i) {
const TString key = reader.KeyByIndex(i);
- const TString fileName = CutFirstSlash(key);
+ const TString fileName = CutFirstSlash(key);
if (!Quiet) {
Cerr << archive << " --> " << fileName << Endl;
}
@@ -454,30 +454,30 @@ static void UnpackArchive(const TString& archive, const TFsPath& dir = TFsPath()
}
}
-static void ListArchive(const TString& archive, bool cutSlash) {
+static void ListArchive(const TString& archive, bool cutSlash) {
TMappingReader mappingReader(archive);
const TArchiveReader& reader = mappingReader.Reader;
const size_t count = reader.Count();
for (size_t i = 0; i < count; ++i) {
const TString key = reader.KeyByIndex(i);
- TString fileName = key;
- if (cutSlash) {
- fileName = CutFirstSlash(key);
- }
+ TString fileName = key;
+ if (cutSlash) {
+ fileName = CutFirstSlash(key);
+ }
Cout << fileName << Endl;
}
}
-static void ListArchiveMd5(const TString& archive, bool cutSlash) {
+static void ListArchiveMd5(const TString& archive, bool cutSlash) {
TMappingReader mappingReader(archive);
const TArchiveReader& reader = mappingReader.Reader;
const size_t count = reader.Count();
for (size_t i = 0; i < count; ++i) {
const TString key = reader.KeyByIndex(i);
- TString fileName = key;
- if (cutSlash) {
- fileName = CutFirstSlash(key);
- }
+ TString fileName = key;
+ if (cutSlash) {
+ fileName = CutFirstSlash(key);
+ }
char md5buf[33];
Cout << fileName << '\t' << MD5::Stream(reader.ObjectByKey(key).Get(), md5buf) << Endl;
}
@@ -534,12 +534,12 @@ int main(int argc, char** argv) {
.Optional()
.StoreValue(&list, true);
- bool cutSlash = true;
- opts.AddLongOption("as-is", "somewhy slash is cutted by default in list; with this option key will be shown as-is")
- .NoArgument()
- .Optional()
- .StoreValue(&cutSlash, false);
-
+ bool cutSlash = true;
+ opts.AddLongOption("as-is", "somewhy slash is cutted by default in list; with this option key will be shown as-is")
+ .NoArgument()
+ .Optional()
+ .StoreValue(&cutSlash, false);
+
bool listMd5 = false;
opts.AddLongOption('m', "md5", "List files in archive with MD5 sums")
.NoArgument()
@@ -635,11 +635,11 @@ int main(int argc, char** argv) {
try {
if (listMd5) {
for (const auto& rec: recs) {
- ListArchiveMd5(rec.Path, cutSlash);
+ ListArchiveMd5(rec.Path, cutSlash);
}
} else if (list) {
for (const auto& rec: recs) {
- ListArchive(rec.Path, cutSlash);
+ ListArchive(rec.Path, cutSlash);
}
} else if (unpack) {
const TFsPath dir(unpackDir);
diff --git a/tools/archiver/tests/test.py b/tools/archiver/tests/test.py
index b92d58f6a9..be076bc3fd 100644
--- a/tools/archiver/tests/test.py
+++ b/tools/archiver/tests/test.py
@@ -64,5 +64,5 @@ class TestArchiver(object):
with open('result_dedup', 'rb') as f_dedup, open('result_no_dedup', 'rb') as f_no_dedup:
archive_dedup = f_dedup.read()
archive_no_dedup = f_no_dedup.read()
- assert len(archive_dedup) == 58
- assert len(archive_no_dedup) == 75
+ assert len(archive_dedup) == 58
+ assert len(archive_no_dedup) == 75
diff --git a/tools/archiver/ya.make b/tools/archiver/ya.make
index 757378c1b3..9193a14838 100644
--- a/tools/archiver/ya.make
+++ b/tools/archiver/ya.make
@@ -8,7 +8,7 @@ OWNER(
PEERDIR(
library/cpp/archive
library/cpp/digest/md5
- library/cpp/getopt/small
+ library/cpp/getopt/small
)
SRCS(
diff --git a/tools/enum_parser/enum_parser/main.cpp b/tools/enum_parser/enum_parser/main.cpp
index 0943c69c1d..10dc2915a6 100644
--- a/tools/enum_parser/enum_parser/main.cpp
+++ b/tools/enum_parser/enum_parser/main.cpp
@@ -1,6 +1,6 @@
#include <library/cpp/json/writer/json_value.h>
#include <library/cpp/json/writer/json.h>
-#include <library/cpp/getopt/small/last_getopt.h>
+#include <library/cpp/getopt/small/last_getopt.h>
#include <tools/enum_parser/parse_enum/parse_enum.h>
diff --git a/tools/fix_elf/patch.cpp b/tools/fix_elf/patch.cpp
index d49ebab307..c71bd09b42 100644
--- a/tools/fix_elf/patch.cpp
+++ b/tools/fix_elf/patch.cpp
@@ -1,6 +1,6 @@
#include "patch.h"
-#include <library/cpp/getopt/last_getopt.h>
+#include <library/cpp/getopt/last_getopt.h>
#include <util/generic/algorithm.h>
#include <util/generic/hash.h>
diff --git a/tools/ya.make b/tools/ya.make
index 51a6b8b426..a458163fac 100644
--- a/tools/ya.make
+++ b/tools/ya.make
@@ -2,7 +2,7 @@ RECURSE(
acceleo
arcdocidstrip
archiver
- archiver/alignment_test
+ archiver/alignment_test
archiver/tests
base64
bigram_compiler