aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-11-07 20:55:15 +0300
committeralexv-smirnov <alex@ydb.tech>2023-11-07 21:36:55 +0300
commit111e8ac04cf0d6593952ecb3cd74bc73cf4d19f8 (patch)
tree3fa840ce1ab05083321bf5f57a7d1bdcaaef6a32
parent872a1ea04c48329c8ab43f6486d9adfddcdf518f (diff)
downloadydb-111e8ac04cf0d6593952ecb3cd74bc73cf4d19f8.tar.gz
Change "config.yaml"
-rw-r--r--ydb/library/yql/minikql/comp_nodes/block_join/avx2/begin.h3
-rw-r--r--ydb/library/yql/minikql/comp_nodes/block_join/avx2/end.h1
-rw-r--r--ydb/library/yql/minikql/comp_nodes/block_join/sse42/begin.h3
-rw-r--r--ydb/library/yql/minikql/comp_nodes/block_join/sse42/end.h1
-rw-r--r--ydb/library/yql/public/purecalc/examples/protobuf/ut/canondata/exectest.run_protobuf_/log.out18
-rw-r--r--ydb/library/yql/public/purecalc/examples/protobuf/ut/canondata/result.json5
-rwxr-xr-xydb/tests/tools/unittest2gtest/cxx_convert.sh63
-rwxr-xr-xydb/tests/tools/unittest2gtest/yamake_convert.sh56
8 files changed, 150 insertions, 0 deletions
diff --git a/ydb/library/yql/minikql/comp_nodes/block_join/avx2/begin.h b/ydb/library/yql/minikql/comp_nodes/block_join/avx2/begin.h
new file mode 100644
index 0000000000..81d8f3ca34
--- /dev/null
+++ b/ydb/library/yql/minikql/comp_nodes/block_join/avx2/begin.h
@@ -0,0 +1,3 @@
+#pragma clang attribute push(__attribute__((target("avx2"))), apply_to=function)
+
+#include "simd.h" \ No newline at end of file
diff --git a/ydb/library/yql/minikql/comp_nodes/block_join/avx2/end.h b/ydb/library/yql/minikql/comp_nodes/block_join/avx2/end.h
new file mode 100644
index 0000000000..fcef763036
--- /dev/null
+++ b/ydb/library/yql/minikql/comp_nodes/block_join/avx2/end.h
@@ -0,0 +1 @@
+#pragma clang attribute pop \ No newline at end of file
diff --git a/ydb/library/yql/minikql/comp_nodes/block_join/sse42/begin.h b/ydb/library/yql/minikql/comp_nodes/block_join/sse42/begin.h
new file mode 100644
index 0000000000..00fffa0930
--- /dev/null
+++ b/ydb/library/yql/minikql/comp_nodes/block_join/sse42/begin.h
@@ -0,0 +1,3 @@
+#pragma clang attribute push(__attribute__((target("sse4.2"))), apply_to=function)
+
+#include "simd.h" \ No newline at end of file
diff --git a/ydb/library/yql/minikql/comp_nodes/block_join/sse42/end.h b/ydb/library/yql/minikql/comp_nodes/block_join/sse42/end.h
new file mode 100644
index 0000000000..fcef763036
--- /dev/null
+++ b/ydb/library/yql/minikql/comp_nodes/block_join/sse42/end.h
@@ -0,0 +1 @@
+#pragma clang attribute pop \ No newline at end of file
diff --git a/ydb/library/yql/public/purecalc/examples/protobuf/ut/canondata/exectest.run_protobuf_/log.out b/ydb/library/yql/public/purecalc/examples/protobuf/ut/canondata/exectest.run_protobuf_/log.out
new file mode 100644
index 0000000000..1ec34e485d
--- /dev/null
+++ b/ydb/library/yql/public/purecalc/examples/protobuf/ut/canondata/exectest.run_protobuf_/log.out
@@ -0,0 +1,18 @@
+Pull stream:
+path = /Moscow/index.html?from=index
+host = news.yandex.ru
+path = /radio/
+host = music.yandex.ru
+
+Push stream:
+path = /Moscow/index.html?from=index
+host = news.yandex.ru
+path = /radio/
+host = music.yandex.ru
+end
+
+Pull stream with pre-compilation:
+path = /Moscow/index.html?from=index
+host = news.yandex.ru
+path = /radio/
+host = music.yandex.ru
diff --git a/ydb/library/yql/public/purecalc/examples/protobuf/ut/canondata/result.json b/ydb/library/yql/public/purecalc/examples/protobuf/ut/canondata/result.json
new file mode 100644
index 0000000000..96a5814765
--- /dev/null
+++ b/ydb/library/yql/public/purecalc/examples/protobuf/ut/canondata/result.json
@@ -0,0 +1,5 @@
+{
+ "exectest.run[protobuf]": {
+ "uri": "file://exectest.run_protobuf_/log.out"
+ }
+}
diff --git a/ydb/tests/tools/unittest2gtest/cxx_convert.sh b/ydb/tests/tools/unittest2gtest/cxx_convert.sh
new file mode 100755
index 0000000000..2bbd254784
--- /dev/null
+++ b/ydb/tests/tools/unittest2gtest/cxx_convert.sh
@@ -0,0 +1,63 @@
+
+#!/bin/bash
+
+usage() {
+ echo Usage: `basename $0` *.cpp
+ exit 0
+}
+
+fail() {
+ echo Error: $*
+ exit 1
+}
+
+[ -n "$1" ] || usage
+[ "$1" != "-h" ] || usage
+[ "$1" != "--help" ] || usage
+
+sed --version > /dev/null 2> /dev/null
+if [ $? -eq 1 ];then
+ gsed --version > /dev/null 2> /dev/null
+ if [ $? -ne 0 ];then
+ echo You seem to have an old version of sed installed on your machine. If on MacOS, run \'brew install gnu-sed\' to run this script.
+ exit
+ fi
+ sed=gsed
+else
+ sed=sed
+fi
+
+while [ -n "$1" ]; do
+
+ echo $1
+ [ -e $1 ] || fail "file not found" $1
+
+ $sed -i -r -e 's/<library\/cpp\/testing\/unittest\/registar.h>/<library\/cpp\/testing\/gtest\/gtest.h>\n#include <ydb\/library\/testlib\/unittest_gtest_macro_subst.h>/' $1
+ $sed -i -r -e '/<library\/cpp\/testing\/gmock_in_unittest\/gmock.h>/d' $1
+
+ grep -n -E -e 'Y_UNIT_TEST_SUITE *\(.*\)' $1 | while read suiteline
+ do
+ # echo suiteline: $suiteline
+ line=`echo $suiteline | cut -d: -f1`
+ first=$(($line+1))
+ # echo first: $first
+ name=`echo $suiteline | $sed -r -e 's/.*Y_UNIT_TEST_SUITE *\((.*)\).*/\1/'`
+ # echo name: $name
+ nextsuiteline=`$sed -n $first',$p' $1 | grep -n -E -m 1 -e 'Y_UNIT_TEST_SUITE *\(.*\)' | cut -d: -f1`
+ # echo nextsuiteline: $nextsuiteline
+ if [[ $nextsuiteline -gt 0 ]]; then
+ next=$(($nextsuiteline+$line))
+ else
+ next='$'
+ fi
+ # echo next: $next
+ $sed -i -r -e $line"s/Y_UNIT_TEST_SUITE *\(.*\)/namespace \/* Unittest suite ${name} *\//" $1
+ $sed -i -r -e $first,$next"s/Y_UNIT_TEST *\((.*)\)/TEST(${name}, \1)/" $1
+ $sed -i -r -e $first,$next's/Y_UNIT_TEST_F *\((.*), *(.*)\) */TEST_F(\2, \1)/' $1
+ # echo
+ done
+
+ $sed -i -r -e 's/NUnitTest::TBaseFixture/::testing::Test/' $1
+
+ shift
+done \ No newline at end of file
diff --git a/ydb/tests/tools/unittest2gtest/yamake_convert.sh b/ydb/tests/tools/unittest2gtest/yamake_convert.sh
new file mode 100755
index 0000000000..441ae988b0
--- /dev/null
+++ b/ydb/tests/tools/unittest2gtest/yamake_convert.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+
+usage() {
+ echo Usage: `basename $0` ya.make
+ exit 0
+}
+
+fail() {
+ echo Error: $*
+ exit 1
+}
+
+[ -n "$1" ] || usage
+[ "$1" != "-h" ] || usage
+[ "$1" != "--help" ] || usage
+
+sed --version > /dev/null 2> /dev/null
+if [ $? -eq 1 ];then
+ gsed --version > /dev/null 2> /dev/null
+ if [ $? -ne 0 ];then
+ echo You seem to have an old version of sed installed on your machine. If on MacOS, run \'brew install gnu-sed\' to run this script.
+ exit
+ fi
+ sed=gsed
+else
+ sed=sed
+fi
+
+while [ -n "$1" ]; do
+
+echo $1
+[ -e $1 ] || fail "file not found" $1
+
+# ya.make
+grep -E -e '^UNITTEST_FOR\(.*\)$' $1 > /dev/null
+if [ $? -eq 0 ]; then
+ text=`grep -m 1 -E -e '^UNITTEST_FOR\(.*\)$' $1 | sed -r -e 's/.*UNITTEST_FOR\((.*)\).*/\1/'`
+ num=`grep -n -m 1 -E -e '^PEERDIR\($' $1 | cut -d: -f1`
+ if [[ $num -gt 0 ]]; then
+ $sed -i -r -e "${num}a\ ${text}" $1
+ fi
+ grep -n -E -e '^[[:space:]]*SRCS\([[:space:]]*$' $1 | while read sr
+ do
+ nums1=$((`echo "$sr" | cut -d: -f1`+1))
+ nums2=$((`$sed -n "$nums1,$ p" $1 | grep -n -m 1 -E -e '^[[:space:]]*)[[:space:]]*$' | cut -d: -f1`+$nums1-2))
+ $sed -i "$nums1,$nums2 s/^[[:space:]]*//" $1
+ $sed -i "$nums1,$nums2 s|^| $text/|" $1
+ done
+fi
+$sed -i -r -e '/library\/cpp\/testing\/gmock_in_unittest/d' $1
+$sed -i -r -e 's/library\/cpp\/testing\/unittest/library\/cpp\/testing\/gtest\n library\/cpp\/testing\/gmock/' $1
+$sed -i -r -e 's/^UNITTEST\(\)$/GTEST()/' $1
+$sed -i -r -e 's/^UNITTEST_FOR\(.*\)$/GTEST()/' $1
+
+shift
+done \ No newline at end of file