Skip to content

Commit 8d7e128

Browse files
committed
test: add inte test and test data
1 parent 96e3a1a commit 8d7e128

File tree

2,076 files changed

+52183
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,076 files changed

+52183
-0
lines changed

test/generate_coverage.sh

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
# Copyright 2024-present Alibaba Inc.
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -e
18+
19+
cd $(dirname "$0")/../
20+
mkdir -p build && cd build
21+
cmake ../ -DPAIMON_COMPILER_ROOT=/usr/ -DCMAKE_BUILD_TYPE=Debug -DPAIMON_BUILD_TESTS=ON -DPAIMON_USE_ASAN=ON -DPAIMON_USE_GCC=ON -DPAIMON_GENERATE_COVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
22+
make -j
23+
make test
24+
lcov --capture --directory src/paimon --directory test --output-file coverage.info
25+
genhtml coverage.info --output-directory coverage
26+
27+
ip=$(hostname -I | awk '{print $1}')
28+
echo
29+
echo "See coverage files at: $PWD/coverage.info"
30+
echo "See coverage html files at: $PWD/coverage/"
31+
echo "View code coverage at: http://$ip:8000/coverage/index.html"
32+
python3 -m http.server

test/inte/CMakeLists.txt

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Copyright 2024-present Alibaba Inc.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
if(PAIMON_BUILD_TESTS)
16+
add_paimon_test(blob_table_inte_test
17+
STATIC_LINK_LIBS
18+
paimon_shared
19+
"-Wl,--whole-archive"
20+
${TEST_STATIC_LINK_LIBS}
21+
"-Wl,--no-whole-archive"
22+
test_utils_static
23+
${GTEST_LINK_TOOLCHAIN})
24+
25+
add_paimon_test(data_evolution_table_test
26+
STATIC_LINK_LIBS
27+
paimon_shared
28+
"-Wl,--whole-archive"
29+
${TEST_STATIC_LINK_LIBS}
30+
"-Wl,--no-whole-archive"
31+
test_utils_static
32+
${GTEST_LINK_TOOLCHAIN})
33+
34+
add_paimon_test(global_index_test
35+
STATIC_LINK_LIBS
36+
paimon_shared
37+
"-Wl,--whole-archive"
38+
${TEST_STATIC_LINK_LIBS}
39+
"-Wl,--no-whole-archive"
40+
test_utils_static
41+
${GTEST_LINK_TOOLCHAIN})
42+
43+
add_paimon_test(write_and_read_inte_test
44+
STATIC_LINK_LIBS
45+
paimon_shared
46+
"-Wl,--whole-archive"
47+
${TEST_STATIC_LINK_LIBS}
48+
"-Wl,--no-whole-archive"
49+
test_utils_static
50+
${GTEST_LINK_TOOLCHAIN})
51+
52+
add_paimon_test(clean_inte_test
53+
STATIC_LINK_LIBS
54+
paimon_shared
55+
"-Wl,--whole-archive"
56+
${TEST_STATIC_LINK_LIBS}
57+
"-Wl,--no-whole-archive"
58+
test_utils_static
59+
${GTEST_LINK_TOOLCHAIN})
60+
61+
add_paimon_test(read_inte_test
62+
STATIC_LINK_LIBS
63+
paimon_shared
64+
"-Wl,--whole-archive"
65+
${TEST_STATIC_LINK_LIBS}
66+
"-Wl,--no-whole-archive"
67+
test_utils_static
68+
${GTEST_LINK_TOOLCHAIN})
69+
70+
add_paimon_test(scan_and_read_inte_test
71+
STATIC_LINK_LIBS
72+
paimon_shared
73+
"-Wl,--whole-archive"
74+
${TEST_STATIC_LINK_LIBS}
75+
"-Wl,--no-whole-archive"
76+
test_utils_static
77+
${GTEST_LINK_TOOLCHAIN})
78+
79+
add_paimon_test(scan_inte_test
80+
STATIC_LINK_LIBS
81+
paimon_shared
82+
"-Wl,--whole-archive"
83+
${TEST_STATIC_LINK_LIBS}
84+
"-Wl,--no-whole-archive"
85+
test_utils_static
86+
${GTEST_LINK_TOOLCHAIN})
87+
88+
add_paimon_test(write_inte_test
89+
STATIC_LINK_LIBS
90+
paimon_shared
91+
"-Wl,--whole-archive"
92+
${TEST_STATIC_LINK_LIBS}
93+
"-Wl,--no-whole-archive"
94+
test_utils_static
95+
${GTEST_LINK_TOOLCHAIN})
96+
97+
add_paimon_test(read_inte_with_index_test
98+
STATIC_LINK_LIBS
99+
paimon_shared
100+
"-Wl,--whole-archive"
101+
${TEST_STATIC_LINK_LIBS}
102+
"-Wl,--no-whole-archive"
103+
test_utils_static
104+
${GTEST_LINK_TOOLCHAIN})
105+
endif()

0 commit comments

Comments
 (0)