mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Merge branch 'master' into simpler-cmake
This commit is contained in:
commit
283af96670
@ -6,29 +6,27 @@ FROM clickhouse/test-util:latest AS cctools
|
|||||||
ENV CC=clang-${LLVM_VERSION}
|
ENV CC=clang-${LLVM_VERSION}
|
||||||
ENV CXX=clang++-${LLVM_VERSION}
|
ENV CXX=clang++-${LLVM_VERSION}
|
||||||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
# DO NOT PUT ANYTHING BEFORE THREE NEXT `RUN` DIRECTIVES
|
# DO NOT PUT ANYTHING BEFORE THE NEXT TWO `RUN` DIRECTIVES
|
||||||
# THE MOST HEAVY OPERATION MUST BE THE FIRST IN THE CACHE
|
# THE MOST HEAVY OPERATION MUST BE THE FIRST IN THE CACHE
|
||||||
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
# libtapi is required to support .tbh format from recent MacOS SDKs
|
# libtapi is required to support .tbh format from recent MacOS SDKs
|
||||||
RUN git clone --depth 1 https://github.com/tpoechtrager/apple-libtapi.git \
|
RUN git clone https://github.com/tpoechtrager/apple-libtapi.git \
|
||||||
&& cd apple-libtapi \
|
&& cd apple-libtapi \
|
||||||
|
&& git checkout 15dfc2a8c9a2a89d06ff227560a69f5265b692f9 \
|
||||||
&& INSTALLPREFIX=/cctools ./build.sh \
|
&& INSTALLPREFIX=/cctools ./build.sh \
|
||||||
&& ./install.sh \
|
&& ./install.sh \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
&& rm -rf apple-libtapi
|
&& rm -rf apple-libtapi
|
||||||
|
|
||||||
# Build and install tools for cross-linking to Darwin (x86-64)
|
# Build and install tools for cross-linking to Darwin (x86-64)
|
||||||
RUN git clone --depth 1 https://github.com/tpoechtrager/cctools-port.git \
|
# Build and install tools for cross-linking to Darwin (aarch64)
|
||||||
|
RUN git clone https://github.com/tpoechtrager/cctools-port.git \
|
||||||
&& cd cctools-port/cctools \
|
&& cd cctools-port/cctools \
|
||||||
|
&& git checkout 2a3e1c2a6ff54a30f898b70cfb9ba1692a55fad7 \
|
||||||
&& ./configure --prefix=/cctools --with-libtapi=/cctools \
|
&& ./configure --prefix=/cctools --with-libtapi=/cctools \
|
||||||
--target=x86_64-apple-darwin \
|
--target=x86_64-apple-darwin \
|
||||||
&& make install -j$(nproc) \
|
&& make install -j$(nproc) \
|
||||||
&& cd ../.. \
|
&& make clean \
|
||||||
&& rm -rf cctools-port
|
|
||||||
|
|
||||||
# Build and install tools for cross-linking to Darwin (aarch64)
|
|
||||||
RUN git clone --depth 1 https://github.com/tpoechtrager/cctools-port.git \
|
|
||||||
&& cd cctools-port/cctools \
|
|
||||||
&& ./configure --prefix=/cctools --with-libtapi=/cctools \
|
&& ./configure --prefix=/cctools --with-libtapi=/cctools \
|
||||||
--target=aarch64-apple-darwin \
|
--target=aarch64-apple-darwin \
|
||||||
&& make install -j$(nproc) \
|
&& make install -j$(nproc) \
|
||||||
|
@ -206,7 +206,7 @@ function build
|
|||||||
(
|
(
|
||||||
cd "$FASTTEST_BUILD"
|
cd "$FASTTEST_BUILD"
|
||||||
TIMEFORMAT=$'\nreal\t%3R\nuser\t%3U\nsys\t%3S'
|
TIMEFORMAT=$'\nreal\t%3R\nuser\t%3U\nsys\t%3S'
|
||||||
( time ninja clickhouse-bundle) |& ts '%Y-%m-%d %H:%M:%S' | tee "$FASTTEST_OUTPUT/build_log.txt"
|
( time ninja clickhouse-bundle clickhouse-stripped) |& ts '%Y-%m-%d %H:%M:%S' | tee "$FASTTEST_OUTPUT/build_log.txt"
|
||||||
BUILD_SECONDS_ELAPSED=$(awk '/^....-..-.. ..:..:.. real\t[0-9]/ {print $4}' < "$FASTTEST_OUTPUT/build_log.txt")
|
BUILD_SECONDS_ELAPSED=$(awk '/^....-..-.. ..:..:.. real\t[0-9]/ {print $4}' < "$FASTTEST_OUTPUT/build_log.txt")
|
||||||
echo "build_clickhouse_fasttest_binary: [ OK ] $BUILD_SECONDS_ELAPSED sec." \
|
echo "build_clickhouse_fasttest_binary: [ OK ] $BUILD_SECONDS_ELAPSED sec." \
|
||||||
| ts '%Y-%m-%d %H:%M:%S' \
|
| ts '%Y-%m-%d %H:%M:%S' \
|
||||||
@ -215,7 +215,6 @@ function build
|
|||||||
mkdir -p "$FASTTEST_OUTPUT/binaries/"
|
mkdir -p "$FASTTEST_OUTPUT/binaries/"
|
||||||
cp programs/clickhouse "$FASTTEST_OUTPUT/binaries/clickhouse"
|
cp programs/clickhouse "$FASTTEST_OUTPUT/binaries/clickhouse"
|
||||||
|
|
||||||
strip programs/clickhouse -o programs/clickhouse-stripped
|
|
||||||
zstd --threads=0 programs/clickhouse-stripped -o "$FASTTEST_OUTPUT/binaries/clickhouse-stripped.zst"
|
zstd --threads=0 programs/clickhouse-stripped -o "$FASTTEST_OUTPUT/binaries/clickhouse-stripped.zst"
|
||||||
fi
|
fi
|
||||||
ccache_status
|
ccache_status
|
||||||
|
@ -189,6 +189,8 @@ function run_tests
|
|||||||
test_prefix=right/performance
|
test_prefix=right/performance
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
run_only_changed_tests=0
|
||||||
|
|
||||||
# Determine which tests to run.
|
# Determine which tests to run.
|
||||||
if [ -v CHPC_TEST_GREP ]
|
if [ -v CHPC_TEST_GREP ]
|
||||||
then
|
then
|
||||||
@ -203,6 +205,7 @@ function run_tests
|
|||||||
# tests. The lists of changed files are prepared in entrypoint.sh because
|
# tests. The lists of changed files are prepared in entrypoint.sh because
|
||||||
# it has the repository.
|
# it has the repository.
|
||||||
test_files=($(sed "s/tests\/performance/${test_prefix//\//\\/}/" changed-test-definitions.txt))
|
test_files=($(sed "s/tests\/performance/${test_prefix//\//\\/}/" changed-test-definitions.txt))
|
||||||
|
run_only_changed_tests=1
|
||||||
else
|
else
|
||||||
# The default -- run all tests found in the test dir.
|
# The default -- run all tests found in the test dir.
|
||||||
test_files=($(ls "$test_prefix"/*.xml))
|
test_files=($(ls "$test_prefix"/*.xml))
|
||||||
@ -226,6 +229,13 @@ function run_tests
|
|||||||
test_files=("${test_files[@]}")
|
test_files=("${test_files[@]}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$run_only_changed_tests" -ne 0 ]; then
|
||||||
|
if [ ${#test_files[@]} -eq 0 ]; then
|
||||||
|
time "$script_dir/report.py" --no-tests-run > report.html
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# For PRs w/o changes in test definitons, test only a subset of queries,
|
# For PRs w/o changes in test definitons, test only a subset of queries,
|
||||||
# and run them less times. If the corresponding environment variables are
|
# and run them less times. If the corresponding environment variables are
|
||||||
# already set, keep those values.
|
# already set, keep those values.
|
||||||
|
@ -19,6 +19,7 @@ parser.add_argument(
|
|||||||
choices=["main", "all-queries"],
|
choices=["main", "all-queries"],
|
||||||
help="Which report to build",
|
help="Which report to build",
|
||||||
)
|
)
|
||||||
|
parser.add_argument("--no-tests-run", action="store_true", default=False)
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
tables = []
|
tables = []
|
||||||
@ -354,6 +355,36 @@ if args.report == "main":
|
|||||||
|
|
||||||
add_tested_commits()
|
add_tested_commits()
|
||||||
|
|
||||||
|
def print_status(status, message):
|
||||||
|
print(
|
||||||
|
(
|
||||||
|
"""
|
||||||
|
<!--status: {status}-->
|
||||||
|
<!--message: {message}-->
|
||||||
|
""".format(
|
||||||
|
status=status, message=message
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
if args.no_tests_run:
|
||||||
|
for t in tables:
|
||||||
|
print(t)
|
||||||
|
print(
|
||||||
|
"<h2>No tests to run. Only changed tests were run, but all changed tests are from another batch.</h2>"
|
||||||
|
)
|
||||||
|
print(
|
||||||
|
f"""
|
||||||
|
</div>
|
||||||
|
{os.getenv("CHPC_ADD_REPORT_LINKS") or ''}
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
# Why failure? Because otherwise we will not notice if we have a bug that leads to 0 tests being run
|
||||||
|
print_status("failure", "No tests changed, nothing to run")
|
||||||
|
exit(0)
|
||||||
|
|
||||||
run_error_rows = tsvRows("run-errors.tsv")
|
run_error_rows = tsvRows("run-errors.tsv")
|
||||||
error_tests += len(run_error_rows)
|
error_tests += len(run_error_rows)
|
||||||
addSimpleTable("Run Errors", ["Test", "Error"], run_error_rows)
|
addSimpleTable("Run Errors", ["Test", "Error"], run_error_rows)
|
||||||
@ -646,16 +677,7 @@ if args.report == "main":
|
|||||||
status = "failure"
|
status = "failure"
|
||||||
message = "Errors while building the report."
|
message = "Errors while building the report."
|
||||||
|
|
||||||
print(
|
print_status(status, message)
|
||||||
(
|
|
||||||
"""
|
|
||||||
<!--status: {status}-->
|
|
||||||
<!--message: {message}-->
|
|
||||||
""".format(
|
|
||||||
status=status, message=message
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
elif args.report == "all-queries":
|
elif args.report == "all-queries":
|
||||||
print((header_template.format()))
|
print((header_template.format()))
|
||||||
|
Loading…
Reference in New Issue
Block a user