mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Don't run ASAN unit tests under gdb
This commit is contained in:
parent
58998d7069
commit
4e9761acf9
@ -4,4 +4,4 @@ ARG FROM_TAG=latest
|
||||
FROM clickhouse/test-base:$FROM_TAG
|
||||
|
||||
COPY run.sh /
|
||||
CMD ["/bin/bash", "/run.sh"]
|
||||
ENTRYPOINT ["/run.sh"]
|
||||
|
@ -2,4 +2,23 @@
|
||||
|
||||
set -x
|
||||
|
||||
timeout 40m gdb -q -ex 'set print inferior-events off' -ex 'set confirm off' -ex 'set print thread-events off' -ex run -ex bt -ex quit --args ./unit_tests_dbms --gtest_output='json:test_output/test_result.json' | tee test_output/test_result.txt
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "Expected exactly one argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "GDB" ];
|
||||
then
|
||||
timeout 40m \
|
||||
gdb -q -ex "set print inferior-events off" -ex "set confirm off" -ex "set print thread-events off" -ex run -ex bt -ex quit --args \
|
||||
./unit_tests_dbms --gtest_output='json:test_output/test_result.json' \
|
||||
| tee test_output/test_result.txt
|
||||
elif [ "$1" = "NO_GDB" ];
|
||||
then
|
||||
timeout 40m \
|
||||
./unit_tests_dbms --gtest_output='json:test_output/test_result.json' \
|
||||
| tee test_output/test_result.txt
|
||||
else
|
||||
echo "Unknown argument: $1"
|
||||
exit 1
|
||||
fi
|
||||
|
@ -174,10 +174,13 @@ def main():
|
||||
test_output = temp_path / "test_output"
|
||||
test_output.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
# Don't run ASAN under gdb since that breaks leak detection
|
||||
gdb_enabled = "NO_GDB" if "asan" in check_name else "GDB"
|
||||
|
||||
run_command = (
|
||||
f"docker run --cap-add=SYS_PTRACE --volume={tests_binary}:/unit_tests_dbms "
|
||||
"--security-opt seccomp=unconfined " # required to issue io_uring sys-calls
|
||||
f"--volume={test_output}:/test_output {docker_image}"
|
||||
f"--volume={test_output}:/test_output {docker_image} ${gdb_enabled}"
|
||||
)
|
||||
|
||||
run_log_path = test_output / "run.log"
|
||||
|
Loading…
Reference in New Issue
Block a user