mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
[testing] run only one perftest
This commit is contained in:
parent
aac2f8aefc
commit
c2d774d598
@ -218,7 +218,7 @@ function run_tests
|
||||
if [ -v CHPC_TEST_RUN_BY_HASH_TOTAL ]; then
|
||||
# filter tests array in bash https://stackoverflow.com/a/40375567
|
||||
for index in "${!test_files[@]}"; do
|
||||
[ $(( index % CHPC_TEST_RUN_BY_HASH_TOTAL )) != "$CHPC_TEST_RUN_BY_HASH_NUM" ] && \
|
||||
[ $(( index )) != "$CHPC_TEST_RUN_BY_HASH_NUM" ] && \
|
||||
unset -v 'test_files[$index]'
|
||||
done
|
||||
# to have sequential indexes...
|
||||
|
@ -102,6 +102,10 @@ if __name__ == "__main__":
|
||||
if "RUN_BY_HASH_TOTAL" in os.environ:
|
||||
run_by_hash_total = int(os.getenv("RUN_BY_HASH_TOTAL", "1"))
|
||||
run_by_hash_num = int(os.getenv("RUN_BY_HASH_NUM", "1"))
|
||||
if run_by_hash_num != 1:
|
||||
print("Skipped ", run_by_hash_num)
|
||||
sys.exit(0)
|
||||
|
||||
docker_env += (
|
||||
f" -e CHPC_TEST_RUN_BY_HASH_TOTAL={run_by_hash_total}"
|
||||
f" -e CHPC_TEST_RUN_BY_HASH_NUM={run_by_hash_num}"
|
||||
|
Loading…
Reference in New Issue
Block a user