|
| 1 | +cmake_policy(SET CMP0012 NEW) |
| 2 | + |
| 3 | +## these tests shouldn't run with valgrind |
| 4 | +list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE |
| 5 | + ft/bnc-insert-benchmark |
| 6 | + ft/ft_loader-test-extractor-1 |
| 7 | + ft/ft_loader-test-extractor-2 |
| 8 | + ft/ft_loader-test-extractor-3 |
| 9 | + ft/upgrade_test_simple |
| 10 | + portability/test-cache-line-boundary-fails |
| 11 | + portability/try-leak-lost |
| 12 | + portability/try-leak-reachable |
| 13 | + portability/try-leak-uninit |
| 14 | + util/helgrind_test_circular_buffer |
| 15 | + util/helgrind_test_partitioned_counter |
| 16 | + util/helgrind_test_partitioned_counter_5833 |
| 17 | + ydb/diskfull.tdb |
| 18 | + ydb/drd_test_4015.tdb |
| 19 | + ydb/drd_test_groupcommit_count.tdb |
| 20 | + ydb/filesize.tdb |
| 21 | + ydb/helgrind_helgrind1.tdb |
| 22 | + ydb/helgrind_helgrind2.tdb |
| 23 | + ydb/helgrind_helgrind3.tdb |
| 24 | + ydb/helgrind_test_groupcommit_count.tdb |
| 25 | + ydb/hot-optimize-table-tests.tdb |
| 26 | + ydb/insert-dup-prelock.tdb |
| 27 | + ydb/loader-cleanup-test2.tdb |
| 28 | + ydb/loader-cleanup-test3.tdb |
| 29 | + ydb/loader-stress-test4.tdb |
| 30 | + ydb/maxsize-for-loader-B.tdb |
| 31 | + ydb/openlimit17.tdb |
| 32 | + ydb/openlimit17-locktree.tdb |
| 33 | + ydb/preload-db-nested.tdb |
| 34 | + ydb/stress-gc.tdb |
| 35 | + ydb/stress-gc2.tdb |
| 36 | + ydb/stress-test.tdb |
| 37 | + ydb/test-5138.tdb |
| 38 | + ydb/test-prepare.tdb |
| 39 | + ydb/test-prepare2.tdb |
| 40 | + ydb/test-prepare3.tdb |
| 41 | + ydb/test-recover1.tdb |
| 42 | + ydb/test-recover2.tdb |
| 43 | + ydb/test-recover3.tdb |
| 44 | + ydb/test-xa-prepare.tdb |
| 45 | + ydb/test4573-logtrim.tdb |
| 46 | + ydb/test_3645.tdb |
| 47 | + ydb/test_groupcommit_perf.tdb |
| 48 | + ydb/test_large_update_broadcast_small_cachetable.tdb |
| 49 | + ydb/test_update_broadcast_stress.tdb |
| 50 | + ydb/test_update_stress.tdb |
| 51 | + ydb/upgrade-test-4.tdb |
| 52 | + ) |
| 53 | + |
| 54 | +if (NOT @RUN_HELGRIND_TESTS@) |
| 55 | + list(APPEND CTEST_CUSTOM_TESTS_IGNORE |
| 56 | + util/helgrind_test_circular_buffer |
| 57 | + util/helgrind_test_partitioned_counter |
| 58 | + util/helgrind_test_partitioned_counter_5833 |
| 59 | + ydb/helgrind_helgrind1.tdb |
| 60 | + ydb/helgrind_helgrind2.tdb |
| 61 | + ydb/helgrind_helgrind3.tdb |
| 62 | + ydb/helgrind_test_groupcommit_count.tdb |
| 63 | + ) |
| 64 | +endif () |
| 65 | + |
| 66 | +if (NOT @RUN_DRD_TESTS@) |
| 67 | + list(APPEND CTEST_CUSTOM_TESTS_IGNORE |
| 68 | + ydb/drd_test_groupcommit_count.tdb |
| 69 | + ydb/drd_test_4015.tdb |
| 70 | + ) |
| 71 | +endif () |
| 72 | + |
| 73 | +## osx's pthreads prefer writers, so this test will deadlock |
| 74 | +if (@CMAKE_SYSTEM_NAME@ STREQUAL Darwin) |
| 75 | + list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE portability/test-pthread-rwlock-rwr) |
| 76 | + list(APPEND CTEST_CUSTOM_TESTS_IGNORE portability/test-pthread-rwlock-rwr) |
| 77 | +endif () |
| 78 | + |
| 79 | +## tests that are supposed to crash will generate memcheck failures |
| 80 | +set(tests_that_should_fail |
| 81 | + ft/test-assertA |
| 82 | + ft/test-assertB |
| 83 | + portability/try-assert-zero |
| 84 | + portability/try-assert0 |
| 85 | + ydb/recover-missing-dbfile-2.abortrecover |
| 86 | + ydb/recover-missing-dbfile.abortrecover |
| 87 | + ydb/test_db_no_env.tdb |
| 88 | + ydb/test_truncate_txn_abort.tdb |
| 89 | + ) |
| 90 | +list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE ${tests_that_should_fail}) |
| 91 | + |
| 92 | +## don't run drd stress tests with valgrind either (because that would do valgrind twice) |
| 93 | +set(stress_tests |
| 94 | + test_stress0.tdb |
| 95 | + test_stress1.tdb |
| 96 | + test_stress2.tdb |
| 97 | + test_stress3.tdb |
| 98 | + test_stress4.tdb |
| 99 | + test_stress5.tdb |
| 100 | + test_stress6.tdb |
| 101 | + test_stress7.tdb |
| 102 | + test_stress_hot_indexing.tdb |
| 103 | + test_stress_openclose.tdb |
| 104 | + test_stress_with_verify.tdb |
| 105 | + ) |
| 106 | +foreach(test ${stress_tests}) |
| 107 | + list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE |
| 108 | + ydb/drd_tiny_${test} |
| 109 | + ydb/drd_mid_${test} |
| 110 | + ydb/drd_large_${test} |
| 111 | + ) |
| 112 | + if(NOT @RUN_LONG_TESTS@) |
| 113 | + list(APPEND CTEST_CUSTOM_TESTS_IGNORE |
| 114 | + ydb/drd_large_${test} |
| 115 | + ) |
| 116 | + endif() |
| 117 | + if (NOT @RUN_DRD_TESTS@) |
| 118 | + list(APPEND CTEST_CUSTOM_TESTS_IGNORE |
| 119 | + ydb/drd_tiny_${test} |
| 120 | + ydb/drd_mid_${test} |
| 121 | + ydb/drd_large_${test} |
| 122 | + ) |
| 123 | + endif () |
| 124 | +endforeach(test) |
| 125 | + |
| 126 | +## upgrade stress tests are 5 minutes long, don't need to run them always |
| 127 | +if(NOT @RUN_LONG_TESTS@) |
| 128 | + foreach(test ${stress_tests}) |
| 129 | + if (NOT ${test} MATCHES test_stress_openclose) |
| 130 | + foreach(oldver 4.2.0 5.0.8 5.2.7 6.0.0 6.1.0 6.5.1 6.6.3) |
| 131 | + foreach(p_or_s pristine stressed) |
| 132 | + if (NOT (${test} MATCHES test_stress4 AND ${p_or_s} MATCHES stressed)) |
| 133 | + foreach(size 2000) |
| 134 | + list(APPEND CTEST_CUSTOM_TESTS_IGNORE ydb/${test}/upgrade/${oldver}/${p_or_s}/${size}) |
| 135 | + endforeach(size) |
| 136 | + endif () |
| 137 | + endforeach(p_or_s) |
| 138 | + endforeach(oldver) |
| 139 | + endif () |
| 140 | + endforeach(test) |
| 141 | +endif() |
| 142 | + |
| 143 | +set(tdb_tests_that_should_fail "ydb/${stress_tests}") |
| 144 | +string(REGEX REPLACE ";" ";ydb/" stress_tests "${stress_tests}") |
| 145 | + |
| 146 | +set(recover_stress_tests |
| 147 | + ydb/recover-test_stress1.abortrecover |
| 148 | + ydb/recover-test_stress2.abortrecover |
| 149 | + ydb/recover-test_stress3.abortrecover |
| 150 | + ydb/recover-test_stress_openclose.abortrecover |
| 151 | + ) |
| 152 | + |
| 153 | +## we run stress tests separately, only run them if asked to |
| 154 | +if(NOT @RUN_STRESS_TESTS@) |
| 155 | + list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE ${stress_tests} ${recover_stress_tests}) |
| 156 | + list(APPEND CTEST_CUSTOM_TESTS_IGNORE ${stress_tests} ${recover_stress_tests}) |
| 157 | +endif() |
| 158 | + |
| 159 | +set(perf_tests |
| 160 | + ydb/perf_checkpoint_var.tdb |
| 161 | + ydb/perf_cursor_nop.tdb |
| 162 | + ydb/perf_malloc_free.tdb |
| 163 | + ydb/perf_nop.tdb |
| 164 | + ydb/perf_ptquery.tdb |
| 165 | + ydb/perf_ptquery2.tdb |
| 166 | + ydb/perf_read_write.tdb |
| 167 | + ydb/perf_xmalloc_free.tdb |
| 168 | + ) |
| 169 | + |
| 170 | +## we also don't need to run perf tests every time |
| 171 | +if(NOT @RUN_PERF_TESTS@) |
| 172 | + list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE ${perf_tests}) |
| 173 | + list(APPEND CTEST_CUSTOM_TESTS_IGNORE ${perf_tests}) |
| 174 | +endif() |
| 175 | + |
| 176 | +## don't run perf tests with valgrind (that's slow) |
| 177 | +file(GLOB perf_test_srcs RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/src/tests" perf_*.cc) |
| 178 | +string(REGEX REPLACE "\\.cc(;|$)" ".tdb\\1" perf_tests "${perf_test_srcs}") |
| 179 | +set(tdb_tests_that_should_fail "ydb/${perf_tests}") |
| 180 | +string(REGEX REPLACE ";" ";ydb/" perf_tests "${perf_tests}") |
| 181 | +list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE ${perf_tests}) |
| 182 | + |
| 183 | +## these tests fail often and aren't helpful |
| 184 | +set(known_failing_tests |
| 185 | + ydb/diskfull.tdb |
| 186 | + ) |
| 187 | +list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE ${known_failing_tests}) |
| 188 | +list(APPEND CTEST_CUSTOM_TESTS_IGNORE ${known_failing_tests}) |
| 189 | + |
| 190 | +## these tests take a long time, only run them if asked to |
| 191 | +set(long_running_tests |
| 192 | + ft/is_empty |
| 193 | + ft/upgrade_test_simple |
| 194 | + ydb/checkpoint_1.tdb |
| 195 | + ydb/checkpoint_stress.tdb |
| 196 | + ydb/hotindexer-with-queries.tdb |
| 197 | + ydb/hot-optimize-table-tests.tdb |
| 198 | + ydb/loader-cleanup-test0.tdb |
| 199 | + ydb/loader-cleanup-test0z.tdb |
| 200 | + ydb/loader-cleanup-test2.tdb |
| 201 | + ydb/loader-cleanup-test2z.tdb |
| 202 | + ydb/loader-stress-test4.tdb |
| 203 | + ydb/loader-stress-test4z.tdb |
| 204 | + ydb/manyfiles.tdb |
| 205 | + ydb/preload-db-nested.tdb |
| 206 | + ydb/recover_stress.tdb |
| 207 | + ydb/root_fifo_1.tdb |
| 208 | + ydb/root_fifo_2.tdb |
| 209 | + ydb/root_fifo_31.tdb |
| 210 | + ydb/root_fifo_32.tdb |
| 211 | + ydb/stress-gc.tdb |
| 212 | + ydb/stress-test.tdb |
| 213 | + ydb/test3529.tdb |
| 214 | + ydb/test_logmax.tdb |
| 215 | + ydb/test_txn_nested2.tdb |
| 216 | + ydb/test_update_broadcast_stress.tdb |
| 217 | + ydb/test_update_stress.tdb |
| 218 | + ) |
| 219 | +if(NOT @RUN_LONG_TESTS@) |
| 220 | + list(APPEND CTEST_CUSTOM_MEMCHECK_IGNORE ${long_running_tests}) |
| 221 | + list(APPEND CTEST_CUSTOM_TESTS_IGNORE ${long_running_tests}) |
| 222 | +endif() |
| 223 | + |
| 224 | +## ignore log_print.cc in coverage report |
| 225 | +list(APPEND CTEST_CUSTOM_COVERAGE_EXCLUDE "log_print.cc") |
| 226 | + |
| 227 | +list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION |
| 228 | + # don't complain about warnings in xz source |
| 229 | + "xz-4.999.9beta/src/liblzma" |
| 230 | + # don't complain about clang missing warnings from xz code |
| 231 | + "clang: warning: unknown warning option" |
| 232 | + # don't complain about warnings in jemalloc source |
| 233 | + "jemalloc/src" |
| 234 | + "jemalloc/internal" |
| 235 | + # don't complain about valgrind headers leaving things unused |
| 236 | + "valgrind/valgrind.h" |
| 237 | + "valgrind/memcheck.h" |
| 238 | + # don't complain about ranlib or libtool on empty archive |
| 239 | + "has no symbols" |
| 240 | + "the table of contents is empty" |
| 241 | + ) |
0 commit comments